Skip to main content

Crate web_thread_select

Crate web_thread_select 

Source
Expand description

§web-thread-select

This crate allows selecting between web-thread and web-thread-shim using a feature flag.

If the target is a wasm32 architecture and the web feature flag is passed, we use the Web implementation of web-thread; otherwise, we transparently substitute in the shim.

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>.