> multiple tasks. Are there any best practices for wrapping such objects? One > solution I see is to dispatch all GObject calls through a dedicated > ever-running task initialized on program startup (GObject needs an explicit > init call anyway, so it's no big deal to add), but this grand central > approach may not be optimal or flexible enough.
This is what tends to happen in Erlang, although in some cases multiple tasks would be available for dispatch (think SQL database connections where each task owns a single connection). It would probably work fine, and if it became a bottleneck you could have a task per object perhaps, or wherever the thread-safe boundary lies. jack. _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev