|
|
|
|
|
by ori_b
1913 days ago
|
|
I know what it is, and there's a reason that all the systems listed as using it are obsolete. > "I don't want an async model, which assumes you're I/O bound, interfering with keeping all those CPUs busy." Strongly implies to me that there's a CPU-bound component there. |
|
>Cooperative multitasking is used with await in languages with a single-threaded event-loop in their runtime, like JavaScript or Python.
There's no reason rust can't have an executor that does the same, and you only use that within the event loop on your one or two HTTP worker threads. If you're waiting in a thread for an HTTP request to return, that's never going to be CPU-bound. I still am failing to see what the problem here is besides a complaint about some rust crate only supporting a multi-threaded executor, which again is a different problem than whether it's done with async futures or not. One could just as easily write some C code that forces the use of threads.