[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ANN: coxpcall 1.6 (was RE: Xavate crash and coxpcall missing 'arg' variable)
- From: Mukhsein Johari <mukhsein@...>
- Date: Wed, 18 May 2005 18:01:55 +0800
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