This is probably the most unsafe library I have written so far. 22 unsafe statements so you don't have to. Lets you send non-send data into other threads temporarily. https://crates.io/crates/fragile
In 0.1 of fragile, sending more than 1 item to another thread and then dropping will cause the program to abort (since the first drop will start a panic, and the 2nd drop because of it means bye bye!)
-
-
I'm sure there are even more issues with it. This really only should be done with non Drop types which do not panic :)
-
Thinking about it more, I believe you'd need to be sure to box the value first. Otherwise, technically, moves are reading the memory. That'd mean that unsynchronized moves could read what another thread has only half written.
- 1 more reply
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.