Fix reference counts for background worker threads
We would decrement this on drop, but never increment it on clone. Oops.
This commit is contained in:
parent
5d9affad17
commit
4564bf9027
|
@ -83,6 +83,8 @@ lazy_static::lazy_static! {
|
|||
|
||||
impl<T, E> Clone for WorkerThreadHandle<T, E> {
|
||||
fn clone(&self) -> Self {
|
||||
self.reference_count.fetch_add(1, Ordering::SeqCst);
|
||||
|
||||
Self {
|
||||
tasks_sender: self.tasks_sender.clone(),
|
||||
reference_count: self.reference_count.clone(),
|
||||
|
|
Loading…
Reference in a new issue