emacs-devel
[Top][All Lists]
Advanced

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

Re: async.el: A simple asynchronous framework for Emacs


From: SAKURAI Masashi
Subject: Re: async.el: A simple asynchronous framework for Emacs
Date: Wed, 20 Jun 2012 18:32:06 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.4 Mule/6.0 (HANACHIRUSATO)

At Wed, 20 Jun 2012 03:13:06 -0500,
John Wiegley wrote:
> :
> Looking further, I see that deferred.el and async.el address slightly
> different problem domains.  For example, `async-start' creates another Emacs
> in which to call the lambda, while deferred.el put the lambda on a timer and
> runs it in the parent Emacs.  This means that if it's a heavy internal
> function -- like a `copy-file' of 10 gigabytes -- it will still block Emacs,
> am I right?

Yes, you are right.
A heavy task should be breaked down into small tasks in the deferred.el manner.

deferred.el just supports job controlling on the Emacs and avoiding callback 
hell.
Changing notation for async tasks, the async tasks becomes composable.
I think the callback style (CPS) is difficult to write and read.

> async.el does not use timers, though it seems that `deferred:process' does,
> even though it also uses process sentinels.  Am I reading that correctly?

Yes.
deferred.el uses `run-at-time` function as a simple job scheduing.
In my experience, I think that the overhead is small enough.
I feel the blocking whole Emacs is more inconvenient.

--
SAKURAI, Masashi (family, given)
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]