pub fn with_global_cb_queue<T>(f: impl FnOnce() -> T) -> T
Expand description
Helper function to initialize and run a global thread-local callback queue.
This is a hack so that C LegacyFile
s can queue listener
callbacks using notify_listeners_with_global_cb_queue
. This is primarily for
TCP
objects, and should not be used with Rust file objects.
The closure should make any borrows of the file object, rather than making any borrows outside of the closure.