Skip to content

Commit

Permalink
fix: solve tls drop panic when task queue drop (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihciah authored Mar 20, 2024
1 parent a1ce0ef commit c677de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monoio/src/task/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ where
ctx.unpark_thread(owner_id);
}
None => {
crate::runtime::DEFAULT_CTX.with(|default_ctx| {
let _ = crate::runtime::DEFAULT_CTX.try_with(|default_ctx| {
crate::runtime::CURRENT.set(default_ctx, || {
crate::runtime::CURRENT.with(|ctx| {
ctx.send_waker(owner_id, waker);
Expand Down Expand Up @@ -237,7 +237,7 @@ where
ctx.unpark_thread(owner_id);
}
None => {
crate::runtime::DEFAULT_CTX.with(|default_ctx| {
let _ = crate::runtime::DEFAULT_CTX.try_with(|default_ctx| {
crate::runtime::CURRENT.set(default_ctx, || {
crate::runtime::CURRENT.with(|ctx| {
ctx.send_waker(owner_id, waker);
Expand Down

0 comments on commit c677de3

Please sign in to comment.