Open loyd opened 2 years ago
In tid.rs LEN is defined as: https://github.com/hawkw/sharded-slab/blob/8ebe120fd28b3a463932bbf0728e2baf5a558840/src/tid.rs#L47
tid.rs
LEN
that gives for the default config (MAX_THREADS = 4096) 13 bit space instead of 12:
MAX_THREADS = 4096
assert_eq!(Tid::<crate::cfg::DefaultConfig>::LEN, 13);
Meanwhile, we have two different checks for TID overflow:
I've missed something?
Any thoughts? Maybe I missed something. Extra bit would be most welcome =)
this might be a bug on my part, whoops!
In
tid.rs
LEN
is defined as: https://github.com/hawkw/sharded-slab/blob/8ebe120fd28b3a463932bbf0728e2baf5a558840/src/tid.rs#L47that gives for the default config (
MAX_THREADS = 4096
) 13 bit space instead of 12:Meanwhile, we have two different checks for TID overflow:
I've missed something?