run hook destructors inside of the scope they were created in
This commit is contained in:
1 parent
e5a11aa2a5
commit
cdf25f0c14
3 files changed
+22
-15
No files matched your search
@@ -300,17 +300,6 @@ impl ScopeContext {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for ScopeContext {
|
||||
fn drop(&mut self) {
|
||||
// Drop all spawned tasks
|
||||
_ = Runtime::with(|rt| {
|
||||
for id in self.spawned_tasks.borrow().iter() {
|
||||
rt.remove_task(*id);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ScopeId {
|
||||
/// Get the current scope id
|
||||
pub fn current_scope_id(self) -> Option<ScopeId> {
|
||||
|
||||
Reference in new issue
Block a user