Module scheduled_executor::executor
[−]
[src]
Executors allow easy scheduling and execution of functions or closures.
The CoreExecutor uses a single thread for scheduling and execution, while the
ThreadPoolExecutor uses multiple threads to execute the function.
Internally, each executor uses a tokio_core::reactor::Core as event loop, that will drive
the scheduling of the functions (and for the CoreExecutor, also their execution). A reference
to the event loop is passed to every function when executed, allowing it to register additional
events if needed.
Structs
| CoreExecutor |
A |
| TaskHandle |
A handle that allows a task to be stopped. A new handle is returned every time a new task is scheduled. Note that stopping a task will prevent it from running the next time it's scheduled to run, but it won't interrupt a task that is currently being executed. |
| ThreadPoolExecutor |
A |