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.
-
-
Replying to @pcwalton
The same reason go has goroutines and not raw threads.
1 reply 0 retweets 2 likes -
Replying to @dotstdy
We tried goroutines in Rust, and they weren’t really any more performant than OS threads. Certainly not enough to justify the complexity increase in FFI, etc.
2 replies 1 retweet 10 likes -
Replying to @pcwalton
It's not really about performance so much as you just can't spawn thousands of OS threads.
2 replies 0 retweets 1 like -
-
Replying to @pcwalton
Add some zeroes then. At some point you run into the virtual memory / stack size issue. Unless you're suggesting running rust with a 4KiB thread stack. Granted it probably doesn't matter that much for most people.
3 replies 0 retweets 2 likes
Stack sizes are a property of GC, not of the threading model. I agree regular Rust threads would be more scalable if the language had GC. But that’s independent of the choice of OS vs. green threads.
-
-
Can someone give those guys goroutines crate and we all rest.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.