mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 14:57:56 +01:00
A number of small updates batched into one commit
This commit is contained in:
parent
9a86bae45a
commit
567df800f3
@ -256,7 +256,7 @@ where
|
|||||||
self.spawn_callsites.insert(metadata);
|
self.spawn_callsites.insert(metadata);
|
||||||
&self.shared.dropped_tasks
|
&self.shared.dropped_tasks
|
||||||
}
|
}
|
||||||
(_, WakerVisitor::WAKE_TARGET) => {
|
(_, WakerVisitor::WAKER_EVENT_TARGET) => {
|
||||||
self.waker_callsites.insert(metadata);
|
self.waker_callsites.insert(metadata);
|
||||||
&self.shared.dropped_tasks
|
&self.shared.dropped_tasks
|
||||||
}
|
}
|
||||||
@ -419,6 +419,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if self.poll_op_callsites.contains(metadata) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ impl Visit for AsyncOpVisitor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl WakerVisitor {
|
impl WakerVisitor {
|
||||||
pub(crate) const WAKE_TARGET: &'static str = "executor::waker";
|
pub(crate) const WAKER_EVENT_TARGET: &'static str = "executor::waker";
|
||||||
|
|
||||||
const WAKE: &'static str = "waker.wake";
|
const WAKE: &'static str = "waker.wake";
|
||||||
const WAKE_BY_REF: &'static str = "waker.wake_by_ref";
|
const WAKE_BY_REF: &'static str = "waker.wake_by_ref";
|
||||||
|
@ -117,10 +117,10 @@ impl<'a, 'executor: 'a> Executor<'executor> {
|
|||||||
target: "executor::task",
|
target: "executor::task",
|
||||||
parent: Span::current(),
|
parent: Span::current(),
|
||||||
"runtime.spawn",
|
"runtime.spawn",
|
||||||
kind = "global",
|
|
||||||
loc.file = location.file(),
|
loc.file = location.file(),
|
||||||
loc.line = location.line(),
|
loc.line = location.line(),
|
||||||
loc.col = location.column(),
|
loc.col = location.column(),
|
||||||
|
kind = "global",
|
||||||
);
|
);
|
||||||
|
|
||||||
let (task, handle) = LightProc::recoverable(future, self.schedule(), span);
|
let (task, handle) = LightProc::recoverable(future, self.schedule(), span);
|
||||||
@ -140,10 +140,10 @@ impl<'a, 'executor: 'a> Executor<'executor> {
|
|||||||
target: "executor::task",
|
target: "executor::task",
|
||||||
parent: Span::current(),
|
parent: Span::current(),
|
||||||
"runtime.spawn",
|
"runtime.spawn",
|
||||||
kind = "local",
|
|
||||||
loc.file = location.file(),
|
loc.file = location.file(),
|
||||||
loc.line = location.line(),
|
loc.line = location.line(),
|
||||||
loc.col = location.column(),
|
loc.col = location.column(),
|
||||||
|
kind = "local",
|
||||||
);
|
);
|
||||||
|
|
||||||
let (task, handle) = LightProc::recoverable(future, schedule_local(), span);
|
let (task, handle) = LightProc::recoverable(future, schedule_local(), span);
|
||||||
|
@ -22,6 +22,8 @@ pub struct ProcHandle<R> {
|
|||||||
pub(crate) raw_proc: NonNull<()>,
|
pub(crate) raw_proc: NonNull<()>,
|
||||||
|
|
||||||
/// A marker capturing the generic type `R`.
|
/// A marker capturing the generic type `R`.
|
||||||
|
// TODO: Instead of writing the future output to the RawProc on heap, put it in the handle
|
||||||
|
// (if still available).
|
||||||
pub(crate) result: PhantomData<R>,
|
pub(crate) result: PhantomData<R>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ pub(crate) struct RawProc<'a, F, R, S> {
|
|||||||
pub(crate) pdata: *const ProcData,
|
pub(crate) pdata: *const ProcData,
|
||||||
pub(crate) schedule: *const S,
|
pub(crate) schedule: *const S,
|
||||||
pub(crate) future: *mut F,
|
pub(crate) future: *mut F,
|
||||||
// TODO: Replace with `MaybeUninit`
|
// TODO: Replace with `*mut MaybeUninit`? And also, store the result in the handle if that's
|
||||||
|
// still available, instead of copying it to the heap.
|
||||||
pub(crate) output: *mut R,
|
pub(crate) output: *mut R,
|
||||||
|
|
||||||
// Make the lifetime 'a of the future invariant
|
// Make the lifetime 'a of the future invariant
|
||||||
|
Loading…
Reference in New Issue
Block a user