Fix races conditions with SyntaxContext
decoding
This commit is contained in:
parent
ef85656a10
commit
e41240e45b
2 changed files with 86 additions and 34 deletions
|
@ -171,3 +171,9 @@ impl<T> Deref for WorkerLocal<T> {
|
|||
unsafe { &self.locals.get_unchecked(self.registry.id().verify()).0 }
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Default> Default for WorkerLocal<T> {
|
||||
fn default() -> Self {
|
||||
WorkerLocal::new(|_| T::default())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue