[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Using L in a function called via LuaJIT.FFI
- From: Mike Pall <mikelu-1110@...>
- Date: Thu, 27 Oct 2011 18:43:21 +0200
Alek Paunov wrote:
> I just read the "recipe" in:
> 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.