Expand description
Asynchronous utilities for MolyKit.
Mainly helps you to deal with the runtime differences across native and web and do workaround integrations of async code in Makepad.
For example: rfd::FileHandle is Send on native, but not on web. And on web
it may need to be send back to the UI through Cx::post_action which requires
Send unconditionally.
Since Makepad doesn’t expose an equivalent to wasm_bindgen_futures::spawn_local
tied to its own event loop, we need to run Tokio on a separate thread which causes
problems with Send.
Structs§
- Abort
OnDrop Handle - A handle that aborts its associated future when dropped.
- Thread
Token - Holds a value inside a thread-local storage.
Traits§
- Platform
Send - Implies
Sendonly on native platforms, but not on WASM. - Platform
Send Future - A future that requires
Sendon native platforms, but not on WASM. - Platform
Send Inner - Platform
Send Stream - A stream that requires
Sendon native platforms, but not on WASM.
Functions§
- abort_
on_ drop - Constructs a future +
AbortOnDropHandlepair. - spawn
- Runs a future independently, in a platform-specific way.
Type Aliases§
- BoxPlatform
Send Future - An owned dynamically typed Future that only requires
Sendon native platforms, but not on WASM. - BoxPlatform
Send Stream - An owned dynamically typed Stream that only requires
Sendon native platforms, but not on WASM.