emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-29 8bf4cdcf79: Avoid recursive process filters in lisp/jsonrpc


From: Stefan Monnier
Subject: Re: emacs-29 8bf4cdcf79: Avoid recursive process filters in lisp/jsonrpc.el (bug#60088)
Date: Sat, 17 Dec 2022 10:37:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

F. Jason Park [2022-12-16 21:37:36] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>     Avoid recursive process filters in lisp/jsonrpc.el (bug#60088)
>>
>> BTW, this has bitten us in various other cases, we should fix it once
>> and for all in the C code by marking the process as "busy" while we're
>> running the filters so we never run filters recursively.
>> [ If we ever bump into a case where recursive filters are needed, we
>>   can then add some function to remove the "busy" mark.
>>   Calling (accept-process-output PROC) should naturally mark PROC as
>>   not-busy.  ]
>>
>>
>>         Stefan
>
> A possibly related discussion from the bug archive:
>
>   https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-03/msg01211.html

Indeed.  I think this points to the need to "spawn" a piece of code to
be executed "ASAP" but not necessarily immediately.

This way when a process filter needs to send something in response to
what it received, it can just "spawn" the send, so we can return from
the process filter before the send finishes.


        Stefan




reply via email to

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