You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typespec_client_core: New web_runtime to support wasm32-unknown-unknown (#2838)
The `typespec_client_core::sleep::sleep` is using the async_runtime's
sleep implementation, which is complicated to support `wasm32`, and will
panic now when targeting to `wasm32`. Instead of make the
`standard_runtime` to support wasm32 sleep (I wonder if it's feasible),
we can instead just introduce another `sleep` implementation to simply
use the `gloo_timers::future::sleep`.
Also, this PR adds a `cfg_attr` for conditionally remove the `Send`
trait from the `async_trait` for the `RetryPolicy`, as the other parts
of the code do.
Fix#2754
Supersedes: #2770
Co-authored-by: Larry Osterman <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Heath Stewart <[email protected]>
Copy file name to clipboardExpand all lines: sdk/typespec/typespec_client_core/src/async_runtime/mod.rs
+45-46Lines changed: 45 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -7,41 +7,38 @@
7
7
//!
8
8
//! It abstracts away the underlying implementation details, allowing for different task execution strategies based on the target architecture and features enabled.
9
9
//!
10
-
//!
11
-
//! Example usage:
10
+
//! # Examples
12
11
//!
13
12
//! ```
14
13
//! use typespec_client_core::async_runtime::get_async_runtime;
0 commit comments