[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: |
Fri, 07 Jul 2023 15:31:20 +0000 |
Po Lu <luangruo@yahoo.com> writes:
>> 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.
So, we can hold when interrupt_input_blocked is changed until the thread
becomes 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.
Hmm. What about locking thread->current_buffer for all other threads?
This appears to solve the majority of the discussed problems.
I am not sure how to deal with buffer->pt for multiple threads running
in the same buffer.
--
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>
- Re: Concurrency via isolated process/thread, (continued)
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/08
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/08
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/07
- Re: Concurrency via isolated process/thread,
Ihor Radchenko <=
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/07
- Re: Concurrency via isolated process/thread, tomas, 2023/07/08
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/08
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/08
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/08
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/09
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/09