[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaTask versus Helper Threads Toolkit
- From: Daniel Quintela <dq@...>
- Date: Sat, 29 Jul 2006 14:05:46 -0300
Thanks Javier, you gave a very precise explanation.
HTT for Win32 is possible using "pthreads-w32" and a few changes in the
original code (my two cents).
Javier Guerra escribió:
On Saturday 29 July 2006 11:32 am, Vijay Aswadhati wrote:
If it is not too much trouble could the respective authors please present
their views and comments on the similarities and differences between these
LuaTask lets you create new Lua spaces and run them in independent threads.
from the point of view of your Lua code, it's more like process forks than
threads. there are no shared state between them, and any interchange of data
is via a message passing API.
HTT doesn't let you create Lua threads. is a framework for C library writers
to easily create asynchronous routines using OS threads. it includes a Lua
API for managing the task objects that represent the unfinished calls. it
makes very simple to write a lua coroutine scheduler that won't block on IO
if it uses libraries build with HTT.
The reason I ask is I was only aware of HTT and at the back off my brain I
had noted down that it needs a Win32 port. I discovered LuaTask today which
seems to be serving a similar purpose and it has Win32 support to boot. Are
they similar, if not by design but in intent?
not really, the intended audience is different.
of course, one possible use for HTT would be a library to create new Lua
states, and the result would be something very similar to LuaTask. as a nice
advantage, such a library would be easily used from a HTT-aware scheduler.
I am a little confused as to which library to go with. My basic need is to
be able to create services that can run in their own native thread and
occasionally or periodically have to communicate with a Lua universe.
the easiest way for you would be LuaTask. I'd only go for the (longer) HTT
route if you want your main Lua thread to use a easily extensible scheduler.
I like HTT for its lightness, but it needs a Win32 port. I have to read and
play with LuaTask to understand it better. Choices, choices... Two is one
LuaTask is more similar to LuaThread. HTT is for writing AIO libraries