New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NF: document that withCol
and withQueue
executes in IO
#13950
Conversation
@@ -58,8 +58,8 @@ object CollectionManager { | |||
var emulateOpenFailure = false | |||
|
|||
/** | |||
* Execute the provided block on a serial queue, to ensure concurrent access | |||
* does not happen. | |||
* Execute the provided block in the IO dispatchers on a serial queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Execute the provided block in the IO dispatchers on a serial queue. | |
* Execute the provided block on a serial background queue, to ensure concurrent access | |
does not happen. | |
* The background queue is run in a Dispatchers.IO context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Involving Dispatchers.IO
in brackets will make it clickable, i.e. [Dispatchers.IO]
@@ -88,6 +88,8 @@ object CollectionManager { | |||
/** | |||
* Execute the provided block with the collection, opening if necessary. | |||
* | |||
* Execution is done in the IO dispatchers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Execution is done in the IO dispatchers. | |
* Calls are serialized, and run in background Dispatchers.IO thread. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry Arthur, I had a typo here: it should have read "run in a". Might as well add another [] at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor wording bikeshedding.
I had some doubt about which function moves to IO dispatcher, whether it was launch method or withCol. I expect this documentation may save a minute to other devs too.
fc8a31e
to
57889a9
Compare
I'm all for bikeshedding here, given that my goal was to improve documentation of a part of the code that seems to be non intuitive. (Or at least, was not to me at first) |
I had some doubt about which function moves to IO dispatcher, whether it was launch method or withCol. I expect this documentation may save a minute to other devs too.