lua-users home
lua-l archive

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


Thanks a lot everyone for your replies!

I've just been checking out your framework William
it seems really good :)

I'll also try your patch Rena and your lib Nodir!

cheers

Chris

On Sat, Sep 20, 2014 at 5:25 AM, Nodir Temirkhodjaev <nodir.temir@gmail.com> wrote:
> I'm looking for a way in which to spawn a pre-emptive thread (e.g. pthread)
> for each TCP connection, in both lua and luajit.

Look at my library: https://github.com/tnodir/luasys
There are examples in test folder.

You can use thread.runvm() to start independent OS thread of LuaState
or thread.run() for cooperative OS thread inside Lua State.

There is scheduler to run coroutines on top of pool of OS threads inside Lua State.
OS threads used for blocking system calls.

-- Nodir