[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: once again, cooperative multitasking?
- From: "Mark D. Anderson" <mda@...>
- Date: Tue, 13 Apr 2004 00:32:41 -0700
I've looked through the mailing list archives, and found a number
of matches, but many of the posts are of the form "I could tell
you how I did this, but then I'd have to kill you."
I'm wondering what the possibilities are for integrating lua with
a C program that uses a user threading library (non preemptive)
such as Pth or coro, based on setjmp/longjmp.
I can see in the manual that there is support for coroutines:
http://www.lua.org/manual/5.0/manual.html#coroutine
http://www.lua.org/manual/5.0/manual.html#5.2
Though this just describes an API from the lua side, with no
explanation of implementation, or indications of
what can and can't be done from C.
Also, I presume that Lua is fine with having distinct threads
on the C side use distinct Lua environments, even
without lua_lock?
lua_lock is just if you want multiple C threads playing in the
same Lua environment?
-mda