TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Asynchronous Programming in Rust

146 点作者 Supermighty大约 6 年前

4 条评论

boulos大约 6 年前
Cool!<p>Having gone through this pain last weekend, I’m a bit wary of examples that are roughly stateless (or at least only do copying between channels). To all rust folks making samples: if you can mix in even a bit of mutable shared state (like a counter, logging, etc.), it goes a long way to showing whether your system can handle scoped threads&#x2F;tasks, shared state, and straightforward concurrency ergonomically.<p>If you compare and contrast the docs for crossbeam’s scoped threads, Rayon’s scope, and an attempt at DIY via raw thread::spawn, I think you want to see the same clarity on the future&#x2F;async&#x2F;await side. Richer examples can really elucidate the pros and cons of different paths.
评论 #19706071 未加载
jedisct1大约 6 年前
Async I&#x2F;O in Rust: don&#x27;t. Wait until everything gets way more stable that it is now.
评论 #19710093 未加载
chmln大约 6 年前
Seems a bit thin on the motivation. What are the benefits over threadpool-based executors? Nit - I already see a drawback in requiring macro-based annotations on functions and for loops - something that&#x27;s not necessary today.<p>Out of all things regarding async programming in Rust, runtime seems like one of the less important aspects. Stabilization, ecosystem, syntax, and even no_std support seem far more important.
评论 #19710596 未加载
networkimprov大约 6 年前
This, or whatever it becomes, should have been baked in when the language debuted. Rust had green threads in an early draft, but they were dropped.<p>Hello? Cloud computing (i.e. datacenter software) requires zillions of concurrent &quot;fibers&quot; on a much smaller number of OS threads.
评论 #19710612 未加载
评论 #19710686 未加载
评论 #19711104 未加载
评论 #19710910 未加载