### Class

# Dex Scheduler

#### Description [src]

    abstract class Dex.Scheduler : GObject.TypeInstance
    {
      /* No available fields */
    }

`DexScheduler` is the base class used by schedulers.

Schedulers are responsible for ensuring asynchronous IO requests and completions are processed. They also schedule closures to be run as part of future result propagation. Additionally, they manage `DexFiber` execution and suspension.

Specialized schedulers such as `DexThreadPoolScheduler` will do this for a number of threads and dispatch new work between them.

#### Ancestors

- DexObject

#### Descendants

- DexMainScheduler
- DexThreadPoolScheduler

#### Functions

###### dex_scheduler_get_default

Gets the default scheduler for the process.

###### dex_scheduler_get_thread_default

Gets the default scheduler for the thread.

###### dex_scheduler_ref_thread_default

Gets the thread default scheduler with the reference count incremented.

#### Instance methods

###### dex_scheduler_get_main_context

Gets the default main context for a scheduler.

###### dex_scheduler_push

Queues `func` to run on `scheduler`.

###### dex_scheduler_spawn

Request `scheduler` to spawn a `DexFiber`.

###### dex_scheduler_spawn_coroutine

Request `scheduler` to spawn a `DexCoroutine` and execute `func` with user data.

unstable since: 1.2

###### dex_scheduler_spawnv

Same as `dex_scheduler_spawn()` but trampolines into a fiber without having to create special structures on the way there.

##### Methods inherited from DexObject (2)

###### dex_ref

Acquires a reference on the given object, and increases its reference count by one.

###### dex_unref

Releases a reference on the given object, and decreases its reference count by one.