News for hackers. Stuff that matters.
Re:Why should you use Tokio vs. threads in Rust? by lumost on Sunday January 29, 2023 @12:09PM (#34570144)
There is an alternative here with coroutines. There is no fundamental reason to take on the function coloring problem.

If one was to benchmark cpp coroutines vs rust async would the performance difference ever pay off?

Re:Why should you use Tokio vs. threads in Rust? by AndrewGaspar on Sunday January 29, 2023 @12:38PM (#34570469)
C++ coroutines[0] are also "function coloring", unless I'm missing something?

[0] https://en.cppreference.com/w/cpp/language/coroutines

Re:Why should you use Tokio vs. threads in Rust? by thayne on Sunday January 29, 2023 @02:50PM (#34571966)
Rust async functions are basically coroutines that suspend when you use await. Except that you can't return intermediate results (although once Generators are stabilized, that should resolve that use case).