The list of the deferred functions and thread join jobs.
Schedule code to be executed when exiting the scope.
This is akin to having a destructor on the stack, except that it is
guaranteed to be run. It is guaranteed that the function is called
after all the spawned threads are joined.
pub fn spawn<'s, F, T>(&'s self, f: F) -> ScopedJoinHandle<'a, T> where 'a: 's, F: FnOnce() -> T + Send + 'a, T: Send + 'a, | |
Create a scoped thread.
spawn
is similar to the spawn
function in Rust's standard library. The
difference is that this thread is scoped, meaning that it's guaranteed to terminate
before the current stack frame goes away, allowing you to reference the parent stack frame
directly. This is ensured by having the parent thread join on the child thread before the
scope exits.
pub fn builder(&'s self) -> ScopedThreadBuilder<'s, 'a> | |
Generates the base configuration for spawning a scoped thread, from which configuration
methods can be chained.
Executes the destructor for this type. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static