add stop token bits, receiver queries, a manual event loop, and a single-thread context#185
Merged
ericniebler merged 3 commits intomainfrom Sep 1, 2021
Merged
Conversation
1d75b77 to
8a995a5
Compare
…gle-thread context
8a995a5 to
c2b80d9
Compare
kirkshoop
approved these changes
Aug 31, 2021
| namespace detail { | ||
| struct task_base { | ||
| void execute() noexcept { | ||
| this->execute_(this); |
Contributor
There was a problem hiding this comment.
execute_ does not match the spelling _execute on line 41
Collaborator
Author
There was a problem hiding this comment.
It's not referring to that function. It's referring to the task_base::execute_ data member on line 36.
| } | ||
| } | ||
|
|
||
| inline void manual_event_loop::stop() { |
Contributor
There was a problem hiding this comment.
probably no change from libunifex, but stop doesn't appear to do the right thing. I don't see the code in run that loops through all the tasks invoking set_done()
Collaborator
Author
There was a problem hiding this comment.
It doesn't. It only stops when the queue has drained.
Contributor
There was a problem hiding this comment.
It is a bit confusing because stop means cancel elsewhere and it means exit run when empty here.
Collaborator
Author
There was a problem hiding this comment.
Perhaps I should call it request_stop()?
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.
No description provided.