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§
- Send
Task - A
Taskwith aSendoutput. See [Task::run_send] for usage. - Task
- A task that’s been spawned on a
Threadthat should eventually compute aT. - 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 inweb-threadsome types can be sent only by performing an explicit transfer operation.
Type Aliases§
- Result
- Convenience alias for
Result<T, Error>.