core-foundation-rs
core-foundation-rs copied to clipboard
CFRunLoop has no rustdoc
I'm trying to figure out how to run a simple dynamic store change monitor in an async environment and cleanly stop it at will. It's apparent I need to spawn a thread and then invoke the servicing loop (which I assume will block until externally stopped). But then how do I stop it when I'm done? Since CFRunLoop
is not Send
, I can't clone and pass it to another thread to invoke stop
, if that's even the right way to do this. Am I supposed to fetch the handle somehow via a fresh call? What's the difference between get_current
and get_main
? What is current_mode
and what are the optional String
contents supposed to look like? None of this is at all clear, and the rustdoc is completely empty.