Struct timely_util::operators_async_ext::Scheduler [−][src]
Expand description
A helper type to integrate timely notifications with async futures. Its intended to be used
with a top level while loop. Timely will automatically make the futures returned by
scheduler.notified.await()
resolve when there are progress or data updates to be processed by
the operator
async fn example(s: Scheduler) {
while scheduler.notified().await {
}
}
Fields
inner: Rc<Cell<bool>>
Implementations
Notifies a waiting task, returning a boolean indicating whether or not there was a pending notification already stored in the scheduler.
If a task is currently waiting, that task is notified. Otherwise, a permit is stored in
this Scheduler
and the next call to notified().await
will complete immediately
consuming the permit made available by this call to notify()
.
Returns a boolean indicating whether a notification is pending
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Scheduler
impl !UnwindSafe for Scheduler
Blanket Implementations
Mutably borrows from an owned value. Read more