lua-users home
lua-l archive

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


Japa ,

I'm not really an expert in posix...
Since you asked about "fork" I assumed you wanted to multi task (multi thread, multi process whatever). Forking is just one way to start a new thread (presumably with the forked thread having still a reference to or a copy of the environment or variables in the main thread). In a more general scenario you just start a new thread and communicate with it. That's the way I use Lua Lanes. It's cross platform (as some of the other multi tasking libraries also are) and frankly I don't care if they are posix or not (windows itself is not posix anyway). Anyway, perhaps it's wise you study the comparison between Lua Lanes and the other multi tasking solutions available (coroutines being the first choice since it's included in Lua, although not really multi tasking).

For details about the implementation of Lua Lanes you can study it's source or ask the author.

Wim


Japa wrote:
Hello Wim,

I look for Lua Lanes and I read about. One question, do you know how he makes multheading without use fork?


On Sat, Apr 4, 2009 at 3:17 AM, Wim Langers <wim.langers@adrias.biz <mailto:wim.langers@adrias.biz>> wrote:

    Japa ,

    There are different multi tasking/multi threading libraries.  I
    recommend you look at Lua Lanes.  If it isn't what you're looking
    for it also has a nice comparison with other libraries.

    Wim


    On Sat, Apr 4, 2009 at 5:23 AM, Japa <greatjapa@gmail.com
    <mailto:greatjapa@gmail.com>> wrote:

        Hello everyone

        I'm a new user of Lua and I am using luaforwindows. I need
        some library that implements a fork function, I looked for
        some library already in luaforwindows that help me but I did
        not find, is there any? I thought to use lposix but I don't
        know how to install in my version of luaforwindows, someone
        help me? I'm using windows xp, Visual C++ 2005 and
        luaforwindows 5.1.4.23.

-- Japa





--
Marcelo Oikawa