lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alek Paunov wrote:
> I just read the "recipe" in:
> 
> http://lua-users.org/lists/lua-l/2011-02/msg00455.html
> 
> Which c coroutine library would you recommend for experimenting this
> approach? Coco ?

Coco's context switching code isn't easily reusable outside of it.
For an initial experiment I'd recommend a C library that's
explicitly designed for lightweight context switching. I suggest
to get something running first and tune afterwards. Windows Fibers
or GNU Pth should be easy, but performance will definitely suck.
Once you are at that point, have a look at the GCC inline
assembler stuff in lcoco.c and try to adapt it to your needs.

--Mike