Closed carllerche closed 2 years ago
This PR is mostly just mechanical. It adds #[track_caller] and gets the location in the public API and plumbs it through. This helps debug deadlocks:
#[track_caller]
thread 'runtime::tests::loom_pool::group_a::pool_multi_spawn' panicked at 'deadlock; threads = [(Id(0), Blocked(Location(Some(Location { file: "tokio/src/runtime/tests/loom_oneshot.rs", line: 45, col: 31 })))), (Id(1), Blocked(Location(Some(Location { file: "tokio/src/park/thread.rs", line: 112, col: 30 })))), (Id(2), Blocked(Location(Some(Location { file: "tokio/src/runtime/thread_pool/park.rs", line: 206, col: 30 }))))]'
The output is pretty bad, but it is definitely helpful :)
This PR is mostly just mechanical. It adds
#[track_caller]
and gets the location in the public API and plumbs it through. This helps debug deadlocks:The output is pretty bad, but it is definitely helpful :)