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.
-
-
Can you tell an OS thread to continue executing on a different stack than it had been on until then? (e.g., because it was too small and you've allocated a bigger one somewhere else)
-
Yes. If you couldn’t, then green threads couldn’t work at all!
- 1 more reply
New conversation -
-
-
Funny how few people have ever configured and/or measured this
-
Measurement is sorely lacking here. When we measured the performance of green threads in Rust, the results were not what we expected! 1:1 threads were surprisingly fast.
- 3 more replies
New conversation -
-
-
ah ok, interesting. i guess i'm used to the JVM threading situation, where the 64 bit JRE uses a 1024K stack size by default, and i just assumed this was normal.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I thought pthreads grab 8MB of virtual memory?
-
He's talking about the stacks for kernel threads, not userspace threads. As you bring up, there's also a pretty big difference between actual memory usage and a memory mapping without backing pages. The practical limit on number of threads on Linux is the arbitary max_map_count.
- 2 more replies
New conversation -
-
-
Why is GC a requirement here? Is it because GC languages tend to stack-allocate less?
Thanks. 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.