Re:Async-await on stable Rust
by brandonbloom on Thursday November 07, 2019 @02:41PM
(#21476570)
Go creates the illusion of preemptive multithreading by having implicit safe-points for cooperative multithreading. Each IO operation is such a safe-point. If you write an infinite loop like `for {}` where there are no IO operations in loop body, it will block indefinitely. This will prevent the underlying OS thread from being available to other goroutines. The same thing can happen even if you do have IO operations in there, but the work being performed is dominated by CPU time instead of IO.
[ Parent
| on HN ]
Note that this is being fixed in the next release: https://golang.org/issue/10958
Re:Async-await on stable Rust
by littlestymaar on Friday November 08, 2019 @02:08AM
(#21480465)
That's cool it's finally coming, this issue is open since 2015! I wonder which performance impact this will have.