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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Rust's concurrency model vs. Go's concurrency model

23 点作者 xlinux11 个月前

6 条评论

jamesmunns11 个月前
I was really hoping for a more insightful contrast of the two. I&#x27;m probably biased by reading a lot about Rust, but this seemed to be another article covering the basics of &quot;what is userspace scheduling&quot; and seemingly ending with &quot;function coloring is bad&quot;.<p>I&#x27;d love to see more impactful reviews in the future, like how Go can do certain things that Rust can&#x27;t, due to a more proactive&#x2F;integrated runtime, or what kind of bugs Rust does catch, like data races or other subtle concurrency bugs possible in Go.<p>The article seemed well written, but I&#x27;d love to see more in-depth or technical reviews. I&#x27;m probably just not the right audience.
评论 #40741408 未加载
Kostarrr11 个月前
If one goroutine uses 2 KiB stack, then 10,000 goroutines use 20,000 KiB, right? Not 20,000 MiB.
评论 #40741448 未加载
oconnor66311 个月前
&gt; If you are developing in Python or C# you may already know the big cost of async&#x2F;await: function coloring where sync function can&#x27;t call async function and vice versa.<p>The &quot;blue can&#x27;t call red&quot; property -- the plot climax of the original function coloring article -- only applies to JS. Other languages can call async functions from sync functions using some sort of &quot;block on&quot; or &quot;wait for&quot; API. The function coloring problem is still annoying, but it&#x27;s not a fundamental limitation like it is in JS.
mrkeen11 个月前
&gt; If you are developing in Python or C# you may already know the big cost of async&#x2F;await: function coloring[1] where sync function can&#x27;t call async function and vice versa.<p>[1] <a href="https:&#x2F;&#x2F;journal.stuffwithstuff.com&#x2F;2015&#x2F;02&#x2F;01&#x2F;what-color-is-your-function&#x2F;" rel="nofollow">https:&#x2F;&#x2F;journal.stuffwithstuff.com&#x2F;2015&#x2F;02&#x2F;01&#x2F;what-color-is-...</a><p>&gt;&gt; You can call a blue function from within a red one.
neonsunset11 个月前
C#&#x27;s threadpool can handle 1M tasks, Elixir with BEAM can handle 1M tasks too (with more effort but still) and Rust can handle joining 1M futures, or even 1M tasks.<p>I wonder if Go can handle 1M goroutines within reasonable memory footprint :)<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40435220">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40435220</a>
culebron2111 个月前
&quot;Sorry, you have been blocked. You are unable to access kerkour.com&quot;
评论 #40741938 未加载
评论 #40741347 未加载
评论 #40741352 未加载