[Top][All Lists]

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

Re: Concurrency via isolated process/thread

From: Po Lu
Subject: Re: Concurrency via isolated process/thread
Date: Fri, 07 Jul 2023 21:35:21 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> AFAIU, current_buffer might be made thread-local and

It _is_ thread local.

> interrupt_input_blocked is more tricky. But it is just one global state
> variable. Surely we can find a solution to make it work with multiple threads.

interrupt_input_blocked should only be relevant to the thread reading
input, i.e. the main thread.

The problem with buffer modification lies in two threads writing to the
same buffer at the same time, changing not only the buffer text, but
also PT, ZV, GPT, its markers and its overlay lists.  No two threads may
be allowed to modify the buffer simultaneously.

reply via email to

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