8000 Introduce Generator and AsyncGenerator coroutine return types by danvratil · Pull Request #69 · qcoro/qcoro · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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
merged 17 commits into from
May 19, 2022

Conversation

danvratil
Copy link
Collaborator

Those return types allow implementing generators and asynchronous
generators (those that contain co_await), respectively.

@github-actions
Copy link
Contributor
github-actions bot commented May 11, 2022

Unit Test Results

  14 files  ±  0    14 suites  ±0   10m 12s ⏱️ ±0s
  16 tests +  2    16 ✔️ +  2  0 💤 ±0  0 ±0 
220 runs  +28  220 ✔️ +28  0 💤 ±0  0 ±0 

Results for commit 4446b27. ± Comparison against base commit 5a7c203.

♻️ This comment has been updated with latest results.

@danvratil danvratil force-pushed the feature/generators branch 2 times, most recently from 7f6e7f3 to 302d13f Compare May 13, 2022 12:35
danvratil added 5 commits May 13, 2022 14:44
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.
@danvratil danvratil force-pushed the feature/generators branch from 302d13f to 0a5fee7 Compare May 13, 2022 12:44
danvratil added 3 commits May 15, 2022 21:12
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).
@danvratil danvratil force-pushed the feature/generators branch from 6abd441 to e783270 Compare May 15, 2022 19:12
danvratil added 4 commits May 17, 2022 23:38
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.
@danvratil danvratil force-pushed the feature/generators branch from be85a82 to f90028d Compare May 19, 2022 09:26
@danvratil danvratil merged commit df058a9 into main May 19, 2022
@danvratil danvratil deleted the feature/generators branch May 19, 2022 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Assignees
No one assigned
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0