Struct breadthread::BreadThread
source · pub struct BreadThread<'lt, Tag: 'static> { /* private fields */ }
👎Deprecated: It is probably a bad idea to use this crate
Expand description
A runtime for allowing thread unsafe code to be run on a designated thread.
Implementations§
source§impl<'lt, Tag: 'static> BreadThread<'lt, Tag>
impl<'lt, Tag: 'static> BreadThread<'lt, Tag>
sourcepub fn undriven() -> (Self, Driver<'lt, Unpinned>)
👎Deprecated: It is probably a bad idea to use this crate
pub fn undriven() -> (Self, Driver<'lt, Unpinned>)
Creates a new BreadThread
along with a Driver
.
This method can be used to use the current thread as the driving thread, if that is desired.
sourcepub fn run<Input: 'lt + Wrapped<Tag>, NtsOutput: 'lt + Send + Sync, TsOutput: 'lt + Wrapped<Tag>>(
&self,
input: Input,
op: impl FnOnce(Input::Unwrapped) -> DirectiveOutput<NtsOutput, TsOutput::Unwrapped> + Send + 'lt
) -> Value<(NtsOutput, TsOutput)> ⓘ
👎Deprecated: It is probably a bad idea to use this crate
pub fn run<Input: 'lt + Wrapped<Tag>, NtsOutput: 'lt + Send + Sync, TsOutput: 'lt + Wrapped<Tag>>( &self, input: Input, op: impl FnOnce(Input::Unwrapped) -> DirectiveOutput<NtsOutput, TsOutput::Unwrapped> + Send + 'lt ) -> Value<(NtsOutput, TsOutput)> ⓘ
Send a new directive to the thread to be polled and used.