Replies: 3 comments 1 reply
-
We already have something like that in tokio-util:
Workstealing is the best default for an executor. We certainly wouldn't want that to be unsafe. Besides, all of this is moot. We can't make backwards-incompatible changes. |
Beta Was this translation helpful? Give feedback.
-
I would like to also point out that the overall strategy of encouraging runtimes to do something to force the language developers to do something feels unnecessary adversarial. We all are language designers, if we think something is amiss, we could ourselves spearhead the change through Rust open development process. My personal views here are:
|
Beta Was this translation helpful? Give feedback.
-
As I mentioned over in async-rs/async-std#1072
Interestingly, this is an option that CloudFlare's And their runtime has this comment in the source code: //! Pingora tokio runtime.
//!
//! Tokio runtime comes in two flavors: a single-threaded runtime
//! and a multi-threaded one which provides work stealing.
//! Benchmark shows that, compared to the single-threaded runtime, the multi-threaded one
//! has some overhead due to its more sophisticated work steal scheduling.
//!
//! This crate provides a third flavor: a multi-threaded runtime without work stealing.
//! This flavor is as efficient as the single-threaded runtime while allows the async
//! program to use multiple cores.
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm posting this idea to many Rust async runtimes discussion threads in order to push for the alternative design of the task spawn API described by @matklad in https://matklad.github.io/2023/12/10/nsfw.html
If you think that this is the right direction for rust to take, I suggest to do the following to arrive at the destination ASAP:
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions