emacs-devel
[Top][All Lists]
Advanced

[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: Tue, 04 Jul 2023 20:12:44 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Tue, 04 Jul 2023 16:58:49 +0000
> 
> emacs-async package explicitly transfers pre-defined set of variables to
> the async Emacs process and cannot transfer non-printable variables
> (like markers or buffers).
> 
> But may it be possible to
> 
> 1. Limit the async process memory to a small lexical subset of symbols
>    (within a function).
> 
> 2. Every time the async process needs to read/write a symbol slot
>    outside its lexical scope, query the main Emacs process.

If it queries the main process, it will have to wait when the main
process is busy.  So this is not really asynchronous.

> More concretely, is it possible to copy internal Elisp object
> representations between Emacs processes and arrange mutability to query
> the right Emacs process that "owns" the object?

This is software: anything's possible ;-).  But Someoneā„¢ needs to
write the code, like marshalling and unmarshalling of such objects
between two processes.  (We do something like that when we write then
load the pdumper file.)  There's more than one way of skinning this
particular cat.

> The inter-process communication does not have to be asynchronous, but
> may work similar to the existing thread implementation.

I wouldn't recommend designing anything by the example of Lisp
threads.  'Nough said.



reply via email to

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