Module web_thread::web
source · Available on
Web only.Expand description
Platform-specific extensions for web-thread on the Web platform.
Modules§
- audio_
worklet audio-workletPlatform-specific extensions forweb-threadon the Web platform to spawn and use audio worklets. SeeBaseAudioContextExt::audio_worklet_node()for a usage example. - message
messagePlatform-specific extensions forweb-threadon the Web platform to sendSerializableandTransferableto other threads.
Structs§
- Waits for the associated thread to finish. See
JoinHandleExt::join_async(). - Waits for the associated scope to finish. See
scope_async(). - Poll to completion to get a
ScopeJoinFuture. SeeScopeFuture::into_wait(). - Waits for the associated scope to finish. See
ScopeFuture::into_wait(). - Waits for the associated thread to finish. See
ScopedJoinHandleExt::join_async(). - Waits for yielding to the event loop to happen. See
yield_now_async().
Enums§
- How long
yield_now_async()should yield execution to the event loop. Seeyield_now_async()for more information.
Traits§
- Web-specific extension for
web_thread::Builder. - Web-specific extension for
web_thread::JoinHandle. - Web-specific extension for
web_thread::Scope. - Web-specific extension for
web_thread::ScopedJoinHandle.
Functions§
- Returns
trueif the current thread supports blocking. - Returns
trueif the main thread supports spawning threads. - Async version of
scope(). - Async version of
spawn(). - spawn_
with_ message messagespawn_async()with message. - Async version of
yield_now(). This yields execution to the event loop.