mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user