项目
在 GitHub 查看
cloudwu/coroutine
关于
用于 C 语言的非对称协程库。
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- -2
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文It's an asymmetric coroutine library (like lua).
You can use coroutine_open to open a schedule first, and then create coroutine in that schedule.
You should call coroutine_resume in the thread that you call coroutine_open, and you can't call it in a coroutine in the same schedule.
Coroutines in the same schedule share the stack , so you can create many coroutines without worry about memory.
But switching context will copy the stack the coroutine used.
Read source for detail.
Chinese blog : http://blog.codingnow.com/2012/07/c_coroutine.html
探索相关项目
加载中…