[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Options for Asynchronous Callbacks
- From: "Thijs Schreijer" <thijs@...>
- Date: Wed, 28 Mar 2012 20:55:48 +0200
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
Behalf Of Gaspard Bucher
> Sent: woensdag 28 maart 2012 18:07
> To: Lua mailing list
> Subject: Re: Options for Asynchronous Callbacks
>
> Some of you who attended the Lua Workshop might know of my struggles to
> use one of the proposed models here (mutex based locking) and that I
rewrote
> all the code in lubyk to use coroutines and sockets.
>
> Blog post on the different architectures: http://lubyk.org/en/post381.html
>
> I first chose the "many threads with a global lock" architecture because
it
> does not require any central scheduler or event loop and because it seemed
> very easy to use. Blocking sockets ? add a thread. Callback based API ?
add
> a thread. GUI ? add a thread. You kind of understand the song here.
>
Gaspar,
Your post mentions the global lock approach and the coroutine approach, but
did you also try the Python GIL model as mentioned by Mike;
http://lua-users.org/lists/lua-l/2005-08/msg00571.html ? Or even better,
that model without the bytecounter (to reduce sync issues to the coroutine
level)?
If so, what where your results?
Thijs