[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: Sat, 08 Jul 2023 08:44:17 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> So, we can hold when interrupt_input_blocked is changed until the thread
> becomes main thread?

IMHO there should only be a single main thread processing input and
display, since that's required by most GUI toolkits.

> Hmm. What about locking thread->current_buffer for all other threads?
> This appears to solve the majority of the discussed problems.

If you're referring to prohibiting two threads from sharing the same
current_buffer, I doubt that's necessary.

> I am not sure how to deal with buffer->pt for multiple threads running
> in the same buffer.

C functions which modify the buffer should be interlocked to prevent
them from running simultaneously with other modifications to the same

reply via email to

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