You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Tokio, panics are generally caught and not propagated to the user when dropping the JoinHandle, however when dropping the JoinHandle of a task that has already completed, that panic can propagate to the user who dropped the JoinHandle. That happens here:
// It is our responsibility to drop the output. This is critical as
// the task output may not be `Send` and as such must remain with
// the scheduler or `JoinHandle`. i.e. if the output remains in the
// task structure until the task is deallocated, it may be dropped
// by a Waker on any arbitrary thread.
let panic = panic::catch_unwind(panic::AssertUnwindSafe(|| {
self.core().stage.drop_future_or_output();
}));
ifletErr(panic) = panic {
maybe_panic = Some(panic);
}
}
// Drop the `JoinHandle` reference, possibly deallocating the task
self.drop_reference();
ifletSome(panic) = maybe_panic {
panic::resume_unwind(panic);
}
}
Note that the unset_join_interested call can only return an error if the task has already completed, so it is the output being dropped — not the future.
The text was updated successfully, but these errors were encountered:
fixestokio-rs#4412
From the issue description:
> In Tokio, panics are generally caught and not passed resumed when
dropping the JoinHandle, however when dropping the JoinHandle of a task
that has already completed, that panic can propagate to the user who
dropped the JoinHandle.
This PR fixes that.
fixestokio-rs#4412
From the issue description:
> In Tokio, panics are generally caught and not passed resumed when
dropping the JoinHandle, however when dropping the JoinHandle of a task
that has already completed, that panic can propagate to the user who
dropped the JoinHandle.
This PR fixes that.
fixestokio-rs#4412
From the issue description:
> In Tokio, panics are generally caught and not passed resumed when
dropping the JoinHandle, however when dropping the JoinHandle of a task
that has already completed, that panic can propagate to the user who
dropped the JoinHandle.
This PR fixes that.
In Tokio, panics are generally caught and not propagated to the user when dropping the
JoinHandle
, however when dropping theJoinHandle
of a task that has already completed, that panic can propagate to the user who dropped theJoinHandle
. That happens here:tokio/tokio/src/runtime/task/harness.rs
Lines 167 to 193 in 4eed411
Note that the
unset_join_interested
call can only return an error if the task has already completed, so it is the output being dropped — not the future.The text was updated successfully, but these errors were encountered: