This commit is contained in:
Jeremy Soller
2024-01-03 11:46:29 -07:00
parent 99f097cf90
commit 92b56f3f92
2 changed files with 66 additions and 17 deletions
+6 -1
View File
@@ -104,7 +104,12 @@ static NEXTKEY: Cell<pthread_key_t> = Cell::new(1);
pub(crate) unsafe fn run_all_destructors() {
for (key, Record { data }) in VALUES.take() {
let Some(&Dtor { destructor: Some(dtor) }) = KEYS.lock().get(&key) else { continue };
let Some(&Dtor {
destructor: Some(dtor),
}) = KEYS.lock().get(&key)
else {
continue;
};
dtor(data);
}