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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ruby: Fibers vs Continuations

25 点作者 luccastera将近 16 年前

2 条评论

pmjordan将近 16 年前
I wish we had either (ideally both) in the JVM. I frequently come across situations with clojure where using a coroutine or continuation would be the cleanest solution. There are various libraries that use some kind of bytecode instrumentation to achieve it, but this places serious constraints on where and how you can use them. Really, this needs to be a VM feature.<p>I wonder if it's possible to apply the same hack as this one for .NET:<p><a href="http://msdn.microsoft.com/en-us/magazine/cc164086.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/magazine/cc164086.aspx</a><p>Basically, use the low-level, OS (C) fiber/coroutine facility and attach the fiber as a thread.
评论 #642721 未加载
carterschonwald将近 16 年前
As far as I can tell, fibers can be implemented from continuations as long as you have first class closures. I think the better question is what are the best continuation based abstractions to be included in a language's standard library :)