lua-users home
lua-l archive

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


Jean-Claude Wippler wrote:
> >We'd like to see implementations of coroutines and multithreads on top these.
> 
> Is anyone doing this, or are you looking for a volunteer?

I'll definitely take a look.  In Sol I already have a coroutine library
based on longjmp.  But it requires knowledge about the structure of the
jmp_buf.  I recently found the POSIX functions getcontext/makecontext/
swapcontext.  I'll change Sol's coro-lib to depend on these functions
and add a prototype ucontext implementation for systems that do not have
these functions [1].  I'll then port this lib to Lua 4.1.

Ciao, ET.

[1] I actually don't know which systems offer these functions.  They
are part of the POSIX standard but afaics not required.  My system
at least does not have them (old Linux).  It would be nice if someone
could tell me which system support them.  Solaris?  Win?  Newer Linux?
Probably a look whether <ucontext.h> with prototypes for these functions
exists is enough...