# set_current_schedule

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

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

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

Makes `schedule` the schedule of the work that runs now on the current thread
([`current_schedule`](/docs/0.5.0/api/ferroui-system/task/function-current_schedule/)), and gives the previous one, which the caller restores when the work
ends: for a schedule that runs work (a dispatcher sets it around each job).

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

## Availability

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