[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Concurrency via isolated process/thread
From: |
Eli Zaretskii |
Subject: |
Re: Concurrency via isolated process/thread |
Date: |
Wed, 05 Jul 2023 14:49:09 +0300 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: emacs-devel@gnu.org
> Date: Wed, 05 Jul 2023 11:23:40 +0000
>
> AFAIU, it is possible to create shared memory only readable by child
> processes.
>
> Then, exchanging data between the two Emacs processes may be done using
> memcpy to/from shared memory.
>
> It may be dumb (I have no experience with processes in C), but I have
> something like the following in mind:
>
> 1. Main Emacs process has a normal Elisp thread that watches for async
> Emacs process requests.
> 2. Once a request arrives, asking to get/modify main Emacs process data,
> the request is fulfilled synchronously and signaled back by writing
> to memory accessible by the async process.
That solves part of the problem, maybe (assuming we'd want to allow
shared memory in Emacs). The other parts -- how to implement async
process requests so that they don't suffer from the same problem, and
how to reference objects outside of the shared memory -- are still
there.
> > I have, too many of them. Some are semi-fixed, but I'm afraid we only
> > don't hear about them because threads are not used in serious,
> > production-quality programs.
>
> You are talking about bugs?
Bugs that are there "by design".
> If nobody goes far enough to discover those,
> they are probably not the real reason why people do not use Elisp threads.
I'm saying that it could be the other way around: we don't hear about
those bugs because threads are not used seriously.
- Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/04
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/04
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/04
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/04
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/04
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/04
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/05
- Re: Concurrency via isolated process/thread,
Eli Zaretskii <=
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/05
- Re: Concurrency via isolated process/thread, Lynn Winebarger, 2023/07/05
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/05
- Re: Concurrency via isolated process/thread, Lynn Winebarger, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/05
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/05
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/04
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/05
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/05