[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Elisp concurrency (was: Re: slow SMTP send blocks emacs)
At Tue, 23 Mar 2010 11:55:38 -0400,
David Abrahams wrote:
>
> For things entirely in elisp, there's always run-with-idle-timer.
>
(see http://www.gnu.org/s/emacs/manual/html_node/elisp/Idle-Timers.html)
So, do people write code which uses this to implement concurrency? It
sounds pretty hard, but possibly like quite a fun hack.
I guess you'd need to have some sort of procedure chunker (easy with a
recusrive or iterative procedure, harder if its time consumption is in
IO). And then maybe set up an idle timer which executes chunks of your
waiting procedure whenever emacs has nothing else to do.
I can imagine the scheduling being reasonably easy to implement, and
to impelement at a good level of abstraction. But I can imagine that
it would also need some interface for executing parts of procedures
which any user of this idle time scheduling system would have to fit
their time-consuming procedure into. That sounds hard.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
ISMS, Computing
Goldsmiths, University of London
Tel: +44 (0)20 7078 5134
Skype: richardjlewis
JID: ironchicken@jabber.earth.li
http://www.richard-lewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+----------------------------------------------+
| Support open access to scholarship |
| http://freeculture.org/ http://www.doaj.org/ |
+----------------------------------------------+