None of this played any role whatsoever in the decision to move forward with futures and async/await. This is offensive and denigrating speculation
-
-
Replying to @withoutboats @BRIAN_____ and
(I didn’t read that comment as offensive, for what it’s worth. Just saying that avoiding unnecessary allocation is valued in Rust code, which seems pretty uncontroversial.)
2 replies 0 retweets 2 likes -
Replying to @pcwalton @withoutboats and
Yes, but the reason async await are wanted is not to avoid allocation, it's to avoid context switching and for c10k. (The reason they're wanted over futures is that future chaining is annoying)
1 reply 0 retweets 1 like -
Replying to @ManishEarth @withoutboats and
Doesn’t context switching always happen anyway when you receive data on a socket?
1 reply 0 retweets 0 likes -
Replying to @pcwalton @withoutboats and
Maybe not comtext switching, sorry. But basically, c10k. c10k isn't primarily a complaint about malloc. Malloc is still part of all this, but a much smaller part
2 replies 0 retweets 1 like -
Replying to @ManishEarth @withoutboats and
What specifically is the problem with having 10k threads? I always heard memory/allocation was the main issue.
1 reply 0 retweets 0 likes -
Replying to @pcwalton @withoutboats and
10k threads on a system just doesn't work, even if they're mostly blocking on IO. I guess that may be due to malloc, but this is a generic complaint from ppl people doing networky stuff, not a rust specific complaint.
2 replies 0 retweets 0 likes -
Replying to @ManishEarth @pcwalton and
Isn't the usual choice between something like green threads, lots of OS threads, and something like async/await/futures? And OS threads are slow, green threads need a runtime/don't fit the C model, so async it is?
3 replies 0 retweets 2 likes -
Replying to @samth @ManishEarth and
Yep, and I'd add that green threads aren't that much faster than OS threads if you don't have a (generational) GC.
2 replies 0 retweets 3 likes -
Replying to @pcwalton @ManishEarth and
Doesn't this vary a lot between OSs? I would be very surprised if Go threads were not faster than Windows kernel threads.
2 replies 0 retweets 2 likes
Yes, I mean on Linux.
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.