Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poisoned thread leads to confusing panic in Pool::current #95

Open
gerwin3 opened this issue Feb 29, 2024 · 0 comments
Open

Poisoned thread leads to confusing panic in Pool::current #95

gerwin3 opened this issue Feb 29, 2024 · 0 comments

Comments

@gerwin3
Copy link

gerwin3 commented Feb 29, 2024

In this code:

sharded-slab/src/shard.rs

Lines 292 to 294 in 40579b9

let tid = Tid::<C>::current();
test_println!("current: {:?}", tid);
let idx = tid.as_usize();

Tid::current().as_usize() may return usize::MAX if the thread was poisoned. This makes it hard to debug since the error seems to indicate the user spawned to many threads, which is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant