4 ms·
I know pcwalton has been banging the "just use threads" drum for a while now. Rust used to use a green thread approach, but if I recall correctly, they ripped a
by losvedir 6y ago
I know pcwalton has been banging the "just use threads" drum for a while now. Rust used to use a green thread approach, but if I recall correctly, they ripped all that out for just native threads with the idea that in most cases it's fast and efficient enough.
I remember when C10K was the big challenge, but even the naive approach of spawning a thread per connection now can handle that.
- birktj 6y agoI believe the reason Rust dropped green threads was to get rid of the runtime system and become a more systems language. Modern fast network code in Rust is based on async/cooperative multitasking distributed over num cpu worker threads which works very well.
- kenhwang 6y agoI've written a "just use threads" approach to a web server in Rust, and if you're just juggling IO and not doing any real work like most CRUD webapps, just about every other async-capable language scaled more gracefully and used less resources.