diff --git a/runtime/console/src/lib.rs b/runtime/console/src/lib.rs index e5c7cc7..c3d38af 100644 --- a/runtime/console/src/lib.rs +++ b/runtime/console/src/lib.rs @@ -256,7 +256,7 @@ where self.spawn_callsites.insert(metadata); &self.shared.dropped_tasks } - (_, WakerVisitor::WAKE_TARGET) => { + (_, WakerVisitor::WAKER_EVENT_TARGET) => { self.waker_callsites.insert(metadata); &self.shared.dropped_tasks } @@ -419,6 +419,7 @@ where } } } + } else if self.poll_op_callsites.contains(metadata) { } } diff --git a/runtime/console/src/visitors.rs b/runtime/console/src/visitors.rs index 77398d1..75706a6 100644 --- a/runtime/console/src/visitors.rs +++ b/runtime/console/src/visitors.rs @@ -369,7 +369,7 @@ impl Visit for AsyncOpVisitor { } 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_BY_REF: &'static str = "waker.wake_by_ref"; diff --git a/runtime/executor/src/pool.rs b/runtime/executor/src/pool.rs index 4c91363..50adb8b 100644 --- a/runtime/executor/src/pool.rs +++ b/runtime/executor/src/pool.rs @@ -117,10 +117,10 @@ impl<'a, 'executor: 'a> Executor<'executor> { target: "executor::task", parent: Span::current(), "runtime.spawn", - kind = "global", loc.file = location.file(), loc.line = location.line(), loc.col = location.column(), + kind = "global", ); let (task, handle) = LightProc::recoverable(future, self.schedule(), span); @@ -140,10 +140,10 @@ impl<'a, 'executor: 'a> Executor<'executor> { target: "executor::task", parent: Span::current(), "runtime.spawn", - kind = "local", loc.file = location.file(), loc.line = location.line(), loc.col = location.column(), + kind = "local", ); let (task, handle) = LightProc::recoverable(future, schedule_local(), span); diff --git a/runtime/lightproc/src/proc_handle.rs b/runtime/lightproc/src/proc_handle.rs index f2144e6..2dd7666 100644 --- a/runtime/lightproc/src/proc_handle.rs +++ b/runtime/lightproc/src/proc_handle.rs @@ -22,6 +22,8 @@ pub struct ProcHandle { pub(crate) raw_proc: NonNull<()>, /// 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, } diff --git a/runtime/lightproc/src/raw_proc.rs b/runtime/lightproc/src/raw_proc.rs index 81e0c21..b23d4f4 100644 --- a/runtime/lightproc/src/raw_proc.rs +++ b/runtime/lightproc/src/raw_proc.rs @@ -24,7 +24,8 @@ pub(crate) struct RawProc<'a, F, R, S> { pub(crate) pdata: *const ProcData, pub(crate) schedule: *const S, 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, // Make the lifetime 'a of the future invariant