lua-users home
lua-l archive

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


On 5/17/05, Javier Guerra <javier@guerrag.com> wrote:
> On Tuesday 17 May 2005 7:20 am, Romulo Bahiense wrote:
> >       I think it would be more elegant than spawing threads / forks /
> > whatever -- and more simple too. That would "make my day" :)
> 
> hard threads/forks are the only way when the code you call takes a long time
> without generating output.
> 

Hi,

Well, the async twisted framework (python) does this, I think without
resorting to threads/forks. From what I understand (not enough good
docs) when you have a 'long running' call, you recode it to return
immediately (so that it does not block) with a what they call a
'defered'. This has an attached callback that gets called when there's
something sent back. You might want to investigate that:
http://twistedmatrix.com/

-- 
Regards,

Mukhsein