Custom _mongoc_usleep function

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.26.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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?

              Assignee:
              Kevin Albertson
              Reporter:
              itrofimow N/A
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: