Skip to content
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

coroutine: experimental: generator: implement move and swap #2354

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bhalevy
Copy link
Member

@bhalevy bhalevy commented Jul 17, 2024

The coroutine generator move ctor, move assignment operator, and swap override were never fully implemented.

This patch completes their implementation
and adds unit tests to cover move and swap
and also moving not-drained generator (to test
moving of their buffered value(s)).

Fixes #1789

The coroutine generator move ctor, move assignment operator,
and swap override were never fully implemented.

This patch completes their implementation
and adds unit tests to cover move and swap
and also moving not-drained generator (to test
moving of their buffered value(s)).

Fixes scylladb#1789

Signed-off-by: Benny Halevy <[email protected]>
@bhalevy bhalevy force-pushed the fix-coroutine-generator-move branch from 1d7a876 to 311c33d Compare July 17, 2024 22:29
@tchaikov
Copy link
Contributor

@bhalevy hi Benny, thank you for addressing this issue. but i think the more fundamental problems of the generator are

I believe we should address these issues before fixing the move semantics of the generator. I agree that they are the next important matters to tackle. Perhaps you could help review pull request #2218? Once it's merged, we should be in a better position to resolve issue #1789. What are your thoughts on this approach?

@bhalevy
Copy link
Member Author

bhalevy commented Jul 19, 2024

@bhalevy hi Benny, thank you for addressing this issue. but i think the more fundamental problems of the generator are

I believe we should address these issues before fixing the move semantics of the generator. I agree that they are the next important matters to tackle. Perhaps you could help review pull request #2218? Once it's merged, we should be in a better position to resolve issue #1789. What are your thoughts on this approach?

I have no objection.
Just please add the additional tests in the PR to #2218 to thoroughly test move semantics of the async_generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coroutine generator cannot be moved or composed.
2 participants