Skip to content

Commit

Permalink
Clarify cancel safety
Browse files Browse the repository at this point in the history
  • Loading branch information
passcod committed Nov 4, 2023
1 parent a52d2ff commit 4cabddc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/tokio/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,12 @@ impl AsyncGroupChild {
///
/// See [the Tokio documentation](Child::wait) for more.
///
/// The current implementation spawns a blocking task on the Tokio thread pool **and is not
/// cancel-safe** (you shouldn't call it twice); contributions are welcome for a better version.
/// The current implementation spawns a blocking task on the Tokio thread pool; contributions
/// are welcome for a better version. Additionally, there is no way to cancel the underlying
/// wait() call, so cancelling this future will not cancel the wait. A waited process that exits
/// will have its resources cleaned up by the kernel: if the application is no longer listening
/// for the underlying wait(), it will not know that the process has exited and will try to wait
/// on it again, which may fail, or could even attach to the recycled PID (of another process).
///
/// # Examples
///
Expand Down

0 comments on commit 4cabddc

Please sign in to comment.