From b069f0cc87759fa99af676be2d5dbf98344d9d17 Mon Sep 17 00:00:00 2001 From: Janis Date: Sat, 22 Feb 2025 11:58:21 +0100 Subject: [PATCH] aaaa --- src/praetor/mod.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/praetor/mod.rs b/src/praetor/mod.rs index fb59fe7..5e74683 100644 --- a/src/praetor/mod.rs +++ b/src/praetor/mod.rs @@ -960,15 +960,6 @@ thread_local! { static SCOPE: UnsafeCell>> = const { UnsafeCell::new(None) }; } -impl Drop for Scope { - fn drop(&mut self) { - self.complete_jobs(); - unsafe { - self.job_counter.wait(); - } - } -} - impl Scope { /// locks shared context #[allow(dead_code)] @@ -1087,6 +1078,10 @@ impl Scope { } self.execute(job); } + + unsafe { + self.job_counter.wait(); + } } pub fn spawn<'a, F>(&self, f: F)