-
-
Notifications
You must be signed in to change notification settings - Fork 67
Introduce Generator and AsyncGenerator coroutine return types #69
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
Merged
Conversation
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
7f6e7f3
to
302d13f
Compare
Those return types allow implementing generators and asynchronous generators (those that contain co_await), respectively.
libc++ doesn't implement majority of the concepts library, so apple-clang build fails.
302d13f
to
0a5fee7
Compare
I suspect this is a bug in clang rather than bug in QCoro, so I opted to disable ASAN check for the function that triggers the bug.
Most files in the library are prefix with qcoro, so this ensures we are more consistent (done in light of #70).
6abd441
to
e783270
Compare
This should be probably renamed to something like QCoroSignalListener. The idea is that there's an object (the generator) that remains connected to the specified signal, collects signal emmissions into a queue and then provides the results in form of a queue.
GCC 10, for some reason, was force-moving the signalQueue into co_await, causing memory error since this was happening in a loop. As a solution, the QCoroSignalQueue is not awaitable, but has an `operator co_await` overload that returns an awaiter, controller from the signal queue.
be85a82
to
f90028d
Compare
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.
Those return types allow implementing generators and asynchronous
generators (those that contain co_await), respectively.