mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-12-22 03:33:48 +01:00
lightproc: drop span guard before deallocating the process
This should fix #77
This commit is contained in:
parent
66877159f0
commit
9805f4ee04
@ -395,7 +395,7 @@ where
|
||||
unsafe fn tick(ptr: *const ()) {
|
||||
let mut raw = Self::from_ptr(ptr);
|
||||
// Enter the span associated with the process to track execution time if enabled.
|
||||
let _guard = (&(*raw.pdata).span).enter();
|
||||
let guard = (&(*raw.pdata).span).enter();
|
||||
|
||||
// Create a context from the raw proc pointer and the vtable inside its pdata.
|
||||
let waker = ManuallyDrop::new(Waker::from_raw(RawWaker::new(
|
||||
@ -487,6 +487,8 @@ where
|
||||
(*raw.pdata).notify();
|
||||
}
|
||||
|
||||
// the tracing guard is inside the proc, so it must be dropped first
|
||||
drop(guard);
|
||||
// Drop the proc reference.
|
||||
Self::decrement(ptr);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user