I’ve never understood the “async I/O is too complicated, why can’t we just use goroutines?” criticism of Rust. You can! They’re called threads, and they work great.
-
-
Actually they aren’t, since the OS doesn’t know which registers are in use and thus has to save all of them. Goroutines are not preemptively context switched; so they actually know which registers they have to save when asking for a context switch.
-
You don’t escape the kernel<->userland switch on I/O either way.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.