SynchronizationContextScheduler
struct · ferroui-reactive · v0.5.0
struct SynchronizationContextScheduler
Schedules work on a context (SynchronizationContextScheduler), a Schedule of
ferroui-system: each work is posted to it with Schedule::schedule_local, unless the
scheduler does not always post and the schedule is the current one of the thread
(ferroui_system::task::current_schedule), which runs it at once.
Members
with_schedule
fn with_schedule(schedule: Arc<dyn Schedule>) -> Rc<Self>
A scheduler that posts all its work to schedule
(SynchronizationContextScheduler(SynchronizationContext)).
with_schedule_and_always_post
fn with_schedule_and_always_post(schedule: Arc<dyn Schedule>, always_post: bool) -> Rc<Self>
A scheduler of schedule that runs its work at once when always_post is false and
schedule is the current schedule of the thread
(SynchronizationContextScheduler(SynchronizationContext, bool alwaysPost)).
new
fn new(context: Arc<dyn SynchronizationContext>) -> Rc<Self>
A scheduler that posts all its work to context
(SynchronizationContextScheduler(SynchronizationContext)).
Deprecated since 0.5.0. use
SynchronizationContextScheduler::with_schedule
with_always_post
fn with_always_post(context: Arc<dyn SynchronizationContext>, always_post: bool) -> Rc<Self>
A scheduler of context that runs its work at once when always_post is false and
context is the current context of the thread
(SynchronizationContextScheduler(SynchronizationContext, bool alwaysPost)).
Deprecated since 0.5.0. use
SynchronizationContextScheduler::with_schedule_and_always_post
context_schedule
fn context_schedule(self: &Self) -> Option<&Arc<dyn Schedule>>
The schedule the scheduler posts to (its context), None for a scheduler of a deprecated
context. Not named schedule, which is the member of IScheduler.
context
fn context(self: &Self) -> &Arc<dyn SynchronizationContext>
The context the scheduler posts to.
Panics
When the scheduler was made with a schedule (with_schedule).
Deprecated since 0.5.0. use
SynchronizationContextScheduler::context_schedule
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyIScheduler
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.