# coroutine **Repository Path**: hevake_lcj/coroutine ## Basic Information - **Project Name**: coroutine - **Description**: No description available - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-05-13 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 本项目Fork自 cloudwu 的 coroutine,源代码仓库为:https://github.com/cloudwu/coroutine/ 本地针对应用需求,对代码进行改良。 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