In particular, if the test iterator_panics_mid_run is extended like this:
#[test]
fn iterator_panics_mid_run() {
let ex = Executor::new();
let panic = std::panic::catch_unwind(|| {
let mut handles = vec![];
ex.spawn_many(
(0..50).map(|i| if i == 25 { panic!() } else { future::ready(i) }),
&mut handles,
)
});
assert!(panic.is_err());
// New code:
let _ = ex.spawn(future::ready(0));
}
...the call to spawn panics due to a PoisonError while trying to lock active. IMO, the slab allocator should not ever be poisoned.
In particular, if the test
iterator_panics_mid_runis extended like this:...the call to
spawnpanics due to aPoisonErrorwhile trying to lockactive. IMO, the slab allocator should not ever be poisoned.