# current_schedule

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-system/task/function-current_schedule/

**function** · [`ferroui-system`](/docs/0.5.0/api/ferroui-system/) · v0.5.0

```rust
fn current_schedule() -> Option<std::sync::Arc<dyn Schedule>>
```

The schedule of the work that runs now on the current thread, which the schedule that runs it
set ([`set_current_schedule`](/docs/0.5.0/api/ferroui-system/task/function-set_current_schedule/)): in a dispatcher job, the dispatcher at the priority of the job.
`None` outside of such work. What `SynchronizationContext.Current` is for .NET code: a task
spawned with [`spawn_local`](/docs/0.5.0/api/ferroui-system/task/function-spawn_local/) takes it, and the code that posts back to where it started (the
reactive libraries) captures it.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/executor.rs#L598)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
