[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: python's twisted deferred : how to in Lua?
- From: "Francisco Sant'anna" <francisco.santanna@...>
- Date: Fri, 26 Mar 2010 14:10:51 -0300
You might also look at LuaGravity.
This mechanism looks like a `link` between two Lua functions:
function a ()
function b (v)
return v * 2
function c (v)
By executing `a`, when it returns 1, `b` is triggered receiving that value.
Then `b` returns 1*2 and `c` is called, printing 3.
On Mon, Mar 22, 2010 at 5:06 PM, Valerio Schiavoni <email@example.com>
the twisted python framework provides a very elegant mechanism to do
asynchronous programming, through so called 'deferred'.
See doc here: http://twistedmatrix.com/documents/current/core/howto/defer.html
I was wondering if there's support for this programming style in the
language itself (looking at the doc I don't think so), or if
something similar is provided by Lua frameworks.