I don’t see how that necessarily follows, but I’ll believe you
-
-
It’s mostly all about malloc perf. Async/await avoids allocations (alliteration!) BTW, the syscall cost of spawning a thread on Linux is a lot less than the cost of allocating the stack.
3 replies 0 retweets 9 likes -
Put another way, basically in the Rust community "requires malloc" is synonymous with "DOA" unless the use of malloc is a temporary hack that people plan to eventually remove. Also legacy; async/await has a clear migration path from futures which is what people currently use.
3 replies 0 retweets 0 likes -
Replying to @BRIAN_____ @pcwalton and
None of this played any role whatsoever in the decision to move forward with futures and async/await. This is offensive and denigrating speculation
1 reply 0 retweets 1 like -
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
I didn’t mean to imply it was Rust-specific :)
-
-
-
Replying to @ManishEarth @pcwalton and
I think it's accurate. I don't think anybody could propose an alternative that requires malloc that would get accepted.
1 reply 0 retweets 0 likes - 7 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.