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

Pop the op later. #85

Merged
merged 2 commits into from
Oct 7, 2023
Merged

Pop the op later. #85

merged 2 commits into from
Oct 7, 2023

Conversation

Berrysoft
Copy link
Member

There could be such case:

Proactor::push      0
Proactor::poll      0
Proactor::pop       0
Proactor::push      0 // Because the previous op is popped.
Proactor::poll      0
Proactor::pop       0
Runtime::poll_task  0 // Boom because the second op replaces the first op.

This PR fixes this problem, making poll_task call pop. Therefore the behavior will be:

Proactor::push      0
Proactor::poll      0
Proactor::push      1 // Because the previous op is *not* popped.
Proactor::poll      1
Runtime::poll_task  0
Proactor::pop       0

This PR also makes RawOp totally hidden because the runtime doesn't need to know it.

It's not a breaking change because it was hidden previously.
Copy link
Member

@George-Miao George-Miao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Berrysoft Berrysoft merged commit 05de22d into compio-rs:master Oct 7, 2023
11 checks passed
@Berrysoft Berrysoft deleted the fix/save-result branch October 7, 2023 16:39
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.

2 participants