stashing this so i can pull it up later: a sketch for a wrapper around AtomicPtr and Arc https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1ca846311b58545aa1a0c7475360f916 …
The sketch looks unsound - if a concurrent swap happens just before line 25, it could destroy the object that is about to get cloned. Do you have a strategy in mind to get around this problem?
-
-
oh yikes, you're right - someone else had pointed out line 47, too >_> i'd have to take a closer look, i haven't considered it fully
-
Yeah atomic Arc is ridiculously difficult to do... It requires either locking or one of the concurrent memory reclamation mechanisms :(
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.