MCPcopy Create free account
hub / github.com/NthTensor/Forte / schedule

Method schedule

src/scope.rs:675–689  ·  view source on GitHub ↗

Schedules this job to be polled, by converting it into a `JobRef` and handing that to the job's own `scheduler`. The `worker` param should be the same as calling `Worker::with_current`.

(self: Arc<Self>, worker: Option<&Worker>)

Source from the content-addressed store, hash-verified

673where
674 S: for<'w> Scheduler<'w>,
675 Fut: Future<Output = ()> + 'scope,
676{
677 /// This vtable is part of what allows a `ScopeFutureJob` to act as an
678 /// async task waker.
679 const VTABLE: RawWakerVTable = RawWakerVTable::new(
680 Self::clone_as_waker,
681 Self::wake,
682 Self::wake_by_ref,
683 Self::drop_as_waker,
684 );
685
686 /// Creates a new `ScopedFutureJob` in an `Arc`. The caller is expected to
687 /// immediately call `into_job_ref` and queue it on a worker to be polled.
688 fn new(
689 scope: &Scope<'scope, 'env>,
690 scheduler: S,
691 future: Fut,
692 ) -> Arc<Self> {

Callers 4

spawn_scopedMethod · 0.45
pollMethod · 0.45
wakeMethod · 0.45
wake_by_refMethod · 0.45

Calls 1

into_job_refMethod · 0.45

Tested by

no test coverage detected