Skip to content

Commit

Permalink
Fix thread panic when "unreachable" SpawnedTask code is reachable. (a…
Browse files Browse the repository at this point in the history
…pache#12086)

* test: demonstrate that the unreachable in SpawnedTask is reachable

* chore: use workspace tokio and add feature

* fix(12089): SpawnedTask will no longer panic during shutdown

* chore(12089): add new error type for JoinError

* refactor(12089): handle join error when using SpawnedTask::join_unwind

* Revert "chore: use workspace tokio and add feature"

This reverts commit 3010288.

* refactor(12089): update test to avoid the looping and global (to package tests) panic hook manipulation

* refactor(12089): make single conditional for unwind vs no-unwind, and update test for cancellation error
  • Loading branch information
wiedld committed Oct 9, 2024
1 parent f7cb596 commit ea22c1a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions datafusion/common-runtime/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,4 @@ mod tests {
Err(e) if e.is_cancelled()
));
}

#[tokio::test]
#[should_panic(expected = "foo")]
async fn panic_resume() {
// this should panic w/o an `unwrap`
SpawnedTask::spawn(async { panic!("foo") })
.join_unwind()
.await
.ok();
}
}

0 comments on commit ea22c1a

Please sign in to comment.