From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: Would you say this information window is well designed? Date: Wed, 24 Feb 2021 05:25:08 +0200 Message-ID: <83o8gataej.fsf@gnu.org> References: <835z2ivknw.fsf@gnu.org> <83sg5mu1hn.fsf@gnu.org> <83r1l6tzbo.fsf@gnu.org> <83pn0qtvn1.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14058"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org, stefankangas@gmail.com, drew.adams@oracle.com, dgutov@yandex.ru To: Peter Dean Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 24 04:26:44 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lEkp2-0003XI-6q for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Feb 2021 04:26:44 +0100 Original-Received: from localhost ([::1]:54032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEkp1-0005gu-6l for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Feb 2021 22:26:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEknk-000590-UO for emacs-devel@gnu.org; Tue, 23 Feb 2021 22:25:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54207) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEknf-0005gI-I8; Tue, 23 Feb 2021 22:25:21 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2787 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lEknZ-0006JM-3k; Tue, 23 Feb 2021 22:25:17 -0500 In-Reply-To: (message from Peter Dean on Tue, 23 Feb 2021 21:58:46 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265562 Archived-At: > Date: Tue, 23 Feb 2021 21:58:46 +0000 > From: Peter Dean > Cc: "drew.adams@oracle.com" , "stefankangas@gmail.com" , "larsi@gnus.org" , "dgutov@yandex.ru" , "emacs-devel@gnu.org" > > 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. You are describing design that is very different from what we have. > > 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. I think this is only true wrt threads that are almost always ready to run. That's not so with our threads: all but one of them are waiting for a mutex.