轻量级、便携式 C++纤维,麻省理工学院许可证
我想获得一个具有 MIT 许可证(或更宽松)的轻量级、便携式光纤库。 Boost.Coroutine 不符合资格(不是轻量级),Portable Coroutine Library 和 Kent C++CSP(均为 GPL)也不符合资格。
编辑:你能帮我找一个吗? :)
I would like to get ahold of a lightweight, portable fiber lib with MIT license (or looser). Boost.Coroutine does not qualify (not lightweight), neither do Portable Coroutine Library nor Kent C++CSP (both GPL).
Edit: could you help me find one? :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
两者都是为 C 编写的。
Both are written for C.
实际上,我过去博客对此进行了讨论。看看吧!我希望它能回答您的问题。在其中,我介绍了许多库,并且我对那些对系统编程(异步 IO)有用的库特别感兴趣。
该报道中明显缺少 Boost.Coroutine,我将在这里讨论它。 Boost.Coroutine 在概念上可能被认为是“重量级”(就其类型系列而言),但实现非常高效。真正的问题是 Boost.Coroutine 不完整,并且(我上次检查)远未完成。我花了一些时间尝试与作者合作解决其非启动问题,因为我真的很期待将它与 Boost.Asio 结合使用(这是 Boost.Coroutine 的主要目标之一),但作者还没有有时间将他的工作带到 Boost 正式审查阶段。
I actually blogged about this in the past. Have a look! I hope it answers your questions. In it, I cover a number of libraries, and I was particularly interested in ones that were useful for systems programming (asynchronous IO).
Conspicuously absent from that coverage is Boost.Coroutine, which I'll discuss here. Boost.Coroutine may be considered "heavyweight" conceptually (in terms of its family of types), but the implementation is quite efficient. The real problem is that Boost.Coroutine is incomplete, and (last I checked) far from complete. I had spent some time trying to work with the author through its non-starter issues, as I was really looking forward to using it in conjunction with Boost.Asio (this was one of Boost.Coroutine's primary objectives), but the author has not had the time to take his work to the Boost formal review stage.
超轻量级“线程”的 C 实现列表
请查看 Protothreads,网址为维基百科文章的底部。
list of implementations for C
for ultra lightweight "threads" take a look at Protothreads at the bottom of the wikipedia article.
如果 Boost 看起来很重,有帮助的人已经提取了 Boost 的相关部分 (
fcontext
) 作为独立库,例如 deboost.context。If Boost seems to heavy, helpful people have extracted the relevant parts of Boost (
fcontext
) as a standalone library, e.g. deboost.context.现在,您有两个更好的 Boost 许可证选项:
Now you have two better options with Boost license:
有一个快速且轻量级的 C 非对称协程库 - libaco。
它非常小、速度非常快并且内存效率极高:
它还具有非常详细的文档。
PS:
它遵循 Apache 许可证,版本 2.0。
There is a blazing fast and lightweight C asymmetric coroutine library - libaco.
It is really small, very fast and extremely memory efficient:
It also has a very detailed documentation.
PS:
It is under the Apache License, Version 2.0.