Crate ste[][src]

Documentation Crates Actions Status

A single-threaded executor with some tricks up its sleeve.

This was primarily written for use in rotary as a low-latency way of interacting with a single background thread for audio-related purposes, but is otherwise a general purpose library that can be used by anyone.

Warning: Some of the tricks used in this crate needs to be sanity checked for safety before you can rely on this for production uses.

Examples

let thread = ste::Thread::new()?;

let mut n = 10;
thread.submit(|| n += 10)?;
assert_eq!(20, n);

thread.join()?;

Structs

Builder

The builder for a Thread which can be configured a bit more.

Panicked

Error raised when we try to interact with a background thread that has panicked.

Tagged

An object T which can only be used on the thread with the corresponding tag.

Thread

The handle for a background thread.