Repository navigation
Document callback delivery thread and timing - #39
Merged
Merged
Conversation
The previous doc promised that the initial callback and any catch-up callbacks racing initialisation complete synchronously before watch_interfaces_with_callback returns. That is only guaranteed on Android; Unix and Windows deliver racing notifications on a worker or OS thread with no ordering relative to the constructor returning. Revise the docs to promise only the initial callback's synchronous pre-return delivery, and to state that subsequent callbacks run on a platform-defined thread and may arrive before or after return. Fixes #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32.
The public docs for
watch_interfaces_with_callbackpromised that the initial callback and any catch-up callbacks racing initialisation complete synchronously before the function returns. That ordering is only enforced on Android; on Unix and Windows racing notifications are dispatched on a worker thread or the OS notification thread with no ordering relative to the constructor returning.This revises the docs to promise only what holds on every platform: the initial callback is invoked synchronously before return. Subsequent callbacks are documented as running on a platform-defined thread (not necessarily the caller's) and as possibly arriving before or after return.