emacs-devel
[Top][All Lists]
Advanced

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

Re: [External] : Re: Would you say this information window is well desig


From: Peter Dean
Subject: Re: [External] : Re: Would you say this information window is well designed?
Date: Tue, 23 Feb 2021 21:58:46 +0000

>
> Why the main thread? The UI could be run in any thread, not
> necessarily in the main one. There's no way to know in advance which
> one will run it.

OK, then how about this: we start a thread which has the only job of
keeping the UI updated. It has high priority and when it is scheduled
it checks when was the UI last updated. If it's within the refresh
rate then it yields to other threads without doing anything. Othwerise,
it updates the UI and then yields.

> And finally, if you give the main thread higher priority up front, how
> can we make sure the other threads will ever get to run?

It is the job of the scheduler to make sure lower priority threads are
not starved, so it takes care of this.



reply via email to

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