Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement SendUniqueCell and corresponding SendUnique trait #371
This allows sending reference counted objects to different threads as
See here for an example usage: https://github.com/sdroege/gstreamer-rs/blob/e8db89464ed51148a710d54c9969e076f3aba702/examples/src/bin/pango-cairo.rs
I plan to add this as another "concurrency" mode to gir, and then most of GIO can be Send-able via this. For Pango this is unfortunately not the case as the layout has a reference to the context (and the context to the fontmap) and uses those, so the refcount of the layout itself is not sufficient for sendability.
That is, this needs very careful investigation for enabling on reference counted objects.