-
Type: New Feature
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
Hi!
At my workplace we use libmongoc in a single-threaded mode atop of stackful-coroutines-based asynchronicity: we have a small amount of threads that manage lots of coroutines, and instead of suspending a thread for I/O or sleeping we suspend a coroutine, while a thread is free to process other bits of workload, if any.
It works wonders with custom implementation of mongoc_stream_t, however because of blocking usleep call usage in topology rescan we had to patch libmongoc to allow users to provide their own implementation of _mongoc_usleep (coroutine-friendly nonblocking sleep in our case).
Would you be interested in reviewing/accepting such a patch, which adds a possibility for users to provide their own sleep implementation?