Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A asymmetric coroutine library for C.
C
branch: master
Failed to load latest commit information.
LICENSE Create LICENSE
Makefile Hello world
README.md blog link
coroutine.c bugfix: typo
coroutine.h Hello world
main.c Hello world

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

Something went wrong with that request. Please try again.