-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Coroutinize waitpid #2532
Coroutinize waitpid #2532
Conversation
src/core/reactor.cc
Outdated
} | ||
|
||
std::chrono::milliseconds wait_timeout(0); | ||
for (;;) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't code things as infinite loops, it means the reader has to reverse-engineer the termination condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in ee292c4
b0e2e4f
to
ee292c4
Compare
In ee292c4:
|
Commit fb6c969 simplified waitpid by always retrying, even if pidfd_open failed. Coroutinizing this path (and folding do_waitpid back into its only caller: waitpid) simplifies the code even further and consolidate the different do_with allocations into a single coroutine frame. Signed-off-by: Benny Halevy <[email protected]>
No need to define them as static variables. Signed-off-by: Benny Halevy <[email protected]>
ee292c4
to
0bc3ba3
Compare
|
@scylladb/seastar-maint please review / consider merging |
Commit fb6c969 simplified
waitpid by always retrying, even if pidfd_open failed.
Coroutinizing this path (and folding do_waitpid back into
its only caller: waitpid) simplifies the code even further
and consolidate the different do_with allocations into a single
coroutine frame.