[Top][All Lists]

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

Re: Concurrency via isolated process/thread

From: tomas
Subject: Re: Concurrency via isolated process/thread
Date: Sat, 8 Jul 2023 21:39:47 +0200

On Sat, Jul 08, 2023 at 10:02:18AM +0000, Ihor Radchenko wrote:
> tomas@tuxteam.de writes:
> > Reducing blocking waits for external stuff (processes, network) would
> > already be a lofty goal for Emacs, and far more attainable, I think.
> Would you mind elaborating?
> AFAIU, the bottlenecks in these scenarios are still on Lisp side and are
> not specific to process/network handling.

I think we agree: the basic building blocks are there, but not every
Lisp code uses them. Writing explicit parallelism is a bit strange
(have a look at the javascript code used in browsers to see what
I mean: whenever they write a function to fetch something from the
server, they provide a callback as a parameter for the function to
know what to do when the network request succeeds. Some times there
are several callbacks (one for the error path).

Of course the function doesn't get called right away, but something
is put somewhere into the structure managing the select/poll/epoll

I've done that in C: it's doable, but definitely more error prone
than the "normal" way of doing things. Of course in Javascript and
Emacs Lisp, with closures (thanks, Stefan!) it is a tad easier.

The elephant in the room is, as Eli says, all this existing code.

I thing that (if going this way at all) the interesting challenge
would be to find a strategy which can bring gradual improvements
without breaking "the rest of the world".


Attachment: signature.asc
Description: PGP signature

reply via email to

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