pub trait Threadable: Send {
    fn install(&self, installer: &Installer);
    fn pause(&self) -> Result<()>;
    fn resume(&self) -> Result<()>;
    fn end(&self) -> Result<()>;
}
Expand description

An interface for a entity that has threads managed by the Runtime.

Required Methods

Method that installs the threads that the Threadable is responsible for.

Called when threads are requested to pause.

Errors

Returns an error is that thread cannot be paused for any reason.

Called when threads are requested to resume.

Errors

Returns an error is that thread cannot be resumed for any reason.

Called when threads are requested to finish.

Errors

Returns an error is that thread cannot be ended for any reason.

Implementors