# CurrentThreadScheduler

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactive/concurrency/struct-currentthreadscheduler/

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

```rust
struct CurrentThreadScheduler
```

Queues work on the current thread (`CurrentThreadScheduler`): the first work runs at once, and
work scheduled while it runs is queued and runs after it, by due time and then in the order it
was scheduled (the trampoline). Delayed work blocks the thread until it is due.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/current_thread_scheduler.rs#L28)

## Members

- [`instance`](#function-instance)
- [`is_schedule_required`](#function-is_schedule_required)

<a id="function-instance"></a>

### instance

```rust
fn instance() -> Rc<dyn IScheduler>
```

The scheduler (`CurrentThreadScheduler.Instance`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/current_thread_scheduler.rs#L34)

<a id="function-is_schedule_required"></a>

### is_schedule_required

```rust
fn is_schedule_required() -> bool
```

Whether the caller has to schedule its work to keep the order of the trampoline: true when
no work of the scheduler is running on the thread (`IsScheduleRequired`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/current_thread_scheduler.rs#L43)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`IScheduler`](/docs/0.5.0/api/ferroui-reactive/concurrency/trait-ischeduler/)

## Availability

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