Closed mzabaluev closed 10 years ago
Cross-thread calls are gone.
Ref
wrappers for most objects are now non-sendable and non-sync.
The very few threadsafe types in GLib (the introspection does not give a way to tell which) are refcounted throught SyncRef
.
Not closing yet because I want to ensure the object structs themselves are not sendable.
The cross-thread call paths are an albatross for code size, performance, and they use a sentinel thread with a statically unpredictable failure mode in case of a deadlock. Reducing to on-stack FFI calls with single-task ownership for all Rust boxes of a GObject seems like a more practical approach.
The battle plan after an IRC discussion with @strcat:
Option<Object<T>>
, with None returned when the reference count is more than one. It's not clear how to do this without parallel refcounting or GObject toggle references and additional state in each Reference.