Conversation
- Add API to get/set TaskContext from/to Task - Add currentContext ReadyAwaitable allowing to get access to the task context from inside the coroutine function. - Add currentPromise ReadyAwaitable giving access to the PromiseBase of the current coroutine. It gives read/write access for advanced use cases, and is used in coro::all to severe connection to the StopToken. - Refactor Latch so that it stores all necessary information in the shared internal state, and now it can be passed around via copying and will retain shared ownership of the state. - Fix bug in coro::all, when during cancellation it was awakening from latch sleep and cancelling without waiting for the child coroutines, thus leaving some of the pointers passed to the child coroutines dangling. Now coro::all correctly passes StopToken to the child coroutines and severes its connection with StopToken, thus waiting for all children's cancellation before cancelling itself. - Fix a strange decision to fire StopToken callbacks before setting stop requested state to true. Now stopped state is true inside the callbacks. - Fix possible deadlock reported by thread sanitizer on linux. Now we do not check if the task was finished during scheduling, leaving that check to only be checked in the execution loop, where the SerialExecutor's state mutex is unlocked during task.resume(). - Add github actions to run unit tests on PR(s) and master push.
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.
context from inside the coroutine function.
the current coroutine. It gives read/write access for advanced use
cases, and is used in coro::all to severe connection to the StopToken.
shared internal state, and now it can be passed around via copying and
will retain shared ownership of the state.
latch sleep and cancelling without waiting for the child coroutines,
thus leaving some of the pointers passed to the child coroutines
dangling. Now coro::all correctly passes StopToken to the child
coroutines and severes its connection with StopToken, thus waiting for
all children's cancellation before cancelling itself.
stop requested state to true. Now stopped state is true inside the
callbacks.
not check if the task was finished during scheduling, leaving that
check to only be checked in the execution loop, where the
SerialExecutor's state mutex is unlocked during task.resume().