Crate web_thread_shim

Source
Expand description

§web-thread-shim

This crate mimics the public API of web-thread, but using native futures and channels, to be substituted in when conditionally compiling cross-platform software.

If you aren’t using web-thread, you probably don’t want this crate! Just use std::thread.

Structs§

SendTask
A Task with a Send output. See [Task::run_send] for usage.
Task
A task that’s been spawned on a Thread that should eventually compute a T.
Thread
A thread running a local future executor (futures::executor::LocalPool).

Enums§

Error
The type of errors that may arise from operations in this crate.

Traits§

Post
Types that can be sent to another thread. In this shim, this trait is just an alias for Send + 'static, but in web-thread some types can be sent only by performing an explicit transfer operation.

Type Aliases§

Result
Convenience alias for Result<T, Error>.