Struct futures_glib::Executor [] [src]

pub struct Executor { /* fields omitted */ }

A handle through which futures can be executed.

This structure is an instance of a Source which can be used to manage the execution of a number of futures within.

Methods

impl Executor
[src]

[src]

Creates a new executor unassociated with any context ready to start spawning futures.

[src]

Attaches this executor to a context, returning the token that it was assigned.

This is required to be called for futures to be completed.

[src]

Generates a remote handle to this event loop which can be used to spawn tasks from other threads into this event loop.

[src]

Unregister this executor and free up internal resources.

[src]

Spawns a new future onto the event loop that this source is associated with.

This function is given a future which is then spawned onto the glib event loop. The glib event loop will listen for incoming events of when futures are ready and attempt to push them all to completion.

The futures spawned here will not be completed unless the attach function is called above.

[src]

Same as spawn above, but spawns a function that returns a future

Trait Implementations

impl Clone for Executor
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F> FutureExecutor<F> for Executor where
    F: Future<Item = (), Error = ()> + 'static, 
[src]

[src]

Spawns a future to run on this Executor, typically in the "background". Read more

Auto Trait Implementations

impl !Send for Executor

impl !Sync for Executor