[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua and multi-threaded FastCGI servers
- From: Javier Guerra <javier@...>
- Date: Fri, 4 Mar 2005 06:34:25 -0500
On Friday 04 March 2005 1:35 am, Peter Colson wrote:
> - Is LuaThreads a separate package or is it the coroutines facility
> within standard
> Lua for doing non-pre-emptive threading in a Lua script? Does it sit on
> of Posix threads (saw references to LuaThreads on top of eCos threads
LuaThreads is an addition to the Lua Core. unfortunately, it can't be
packaged as a loadable module, it has to be compiled into the core.
It handles preemptive threads using Posix threads, it also works in windows,
using a small adapter library (included) to make them look like posix.
> - I can see a lua_newthread() API that can be called from C - is this an
> alternative to creating my own Posix thread and then lua_open()'ing a
> Lua VM within that thread (which was what I was trying to do now)?
no, that lua_newthread() creates a lua 'thread' value. i think it's the basic
value that holds state, used to create coroutines. it gets confusing because
of the name, but it's a different thing.
Description: PGP signature