lua-users home
lua-l archive

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


erik@hougaard.com (Erik Hougaard) wrote:
> I'm a big fan of using threads if they are present in the OS instead of
> inventing it myself. I can also take advantage of multi-processor and 
other
> hardware stuff to help increase performance thread-wise.

Those are advantages under certain conditions. If you have alot of threads
(100s or 1000s) most OSes start to have trouble dealing with the overhead.
(and the speed of 2 processors doesn't make up for the difference)
Lightweight threads are much more scalable. eGroups, for instance, uses 
a python-based mail server that uses lightweight threads to handle 1000s
of open sendmail connections simultaniously. 

On the client side, light weight threads could be nice with Lua since they'd
avoid issues with sharing state info.

Steve