[Top][All Lists]

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

Re: Concurrency via isolated process/thread

From: Ihor Radchenko
Subject: Re: Concurrency via isolated process/thread
Date: Wed, 05 Jul 2023 13:26:54 +0000

Po Lu <luangruo@yahoo.com> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>> I imagine that the child Emacs will have a very limited obarray.
>> If a symbol is not found in that process-local obarray, a query to
>> parent Emacs process will be sent to retrieve the symbol slot values.
> How will you retrieve the value of a symbol that does not exist in the
> child process?

See my other reply.
The idea is to create a special Lisp Object type.

> And what about the negative performance implications of
> contacting another process to retrieve a symbol's value?  The object
> will have to be copied from the parent, and the parent may also be busy.

Yes, such requests will be synchronous and will need to be avoided.
Ideally, child process just need to query input at the beginning and
transfer the output at the end without communicating with parent
process. Any other communication will be costly.

> Anyway, we already have sufficient mechanisms for communicating with
> subprocesses.

I am only aware of text-based communication. Is there anything else?

> If Emacs is to take any more advantage of SMP systems, it
> must be properly interlocked, with multiple processors sharing the same
> memory.  This lesson was learned decades ago with another program:
> vmunix.

AFAIU, one of the big blockers of this is single-threaded GC. Emacs
cannot free/allocate memory asynchronously. Or do I miss something?

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

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