Expand description
This library allows sharing references to objects across thread boundaries,
even when those objects aren’t Send
or Sync
. The objects themselves are
held in an ObjectStore
struct that isn’t necessarily Send
/Sync
, and so
the objects can still only be actually used on the owning thread.
This differs from some other crates such as
fragile
or
send_wrapper
in that the access
rule is enforced at compile time, and that the ObjectStore
(currently)
requires an extra garbage collection function to be called manually.
Structs§
- A reference to an object in an
ObjectStore
. This can be held in any thread, even ifT
isn’tSend
orSync
, because in such a case, to access the object, you’ll still need to be on the thread owning theObjectStore
. - A storage allowing references to objects that aren’t
Send
orSync
. The references (ObjectRef
s) can be held in other threads, even ifT
isn’tSend
orSync
, because in such a case, to access the object, you’ll still need to be on the thread owning theObjectStore
.