|
This one is going to be pretty difficult with the C driver API.
I presume the target use case for this (and I may be wrong), is that you would get an array of mongoc_cursor_t structures back each ready to go to iterate on a different cursor. And then pass each to a thread to iterate the cursors.
This doesn't work in the C driver because they would share a mongoc_client_t, which is not thread safe (and no intention of changing that).
So any sort of helper here would likely just allow for the caller to create a new client (or retrieve one from the pool), and create a cursor for it manually.
|