From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: User interaction from multiple threads Date: Thu, 30 Aug 2018 16:05:05 +0300 Message-ID: <83zhx40zum.fsf@gnu.org> References: <838t59j821.fsf@gnu.org> <87lg92q7ih.fsf@runbox.com> <83a7phdl7r.fsf@gnu.org> <61492e7f622303d02405bedbe65fabae@webmail.orcon.net.nz> <83pnybdaer.fsf@gnu.org> <837ekicw7i.fsf@gnu.org> <877ekiierh.fsf@himinbjorg.adminart.net> <834lflb2fj.fsf@gnu.org> <83h8jk9l41.fsf@gnu.org> <8336v2994c.fsf@gnu.org> <83bm9q6x7v.fsf@gnu.org> <874lfi863s.fsf@himinbjorg.adminart.net> <83va7x5guc.fsf@gnu.org> <23431.17784.483000.193228@gargle.gargle.HOWL> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1535634212 7164 195.159.176.226 (30 Aug 2018 13:03:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 30 Aug 2018 13:03:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Uday S Reddy Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 30 15:03:28 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fvMbf-0001i6-Q6 for ged-emacs-devel@m.gmane.org; Thu, 30 Aug 2018 15:03:27 +0200 Original-Received: from localhost ([::1]:48884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvMdl-0000PI-Sh for ged-emacs-devel@m.gmane.org; Thu, 30 Aug 2018 09:05:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvMda-0000N0-NJ for emacs-devel@gnu.org; Thu, 30 Aug 2018 09:05:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvMdV-0001KR-0K for emacs-devel@gnu.org; Thu, 30 Aug 2018 09:05:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvMdU-0001KN-Th; Thu, 30 Aug 2018 09:05:20 -0400 Original-Received: from [176.228.60.248] (port=4998 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fvMdU-0007AS-EP; Thu, 30 Aug 2018 09:05:20 -0400 In-reply-to: <23431.17784.483000.193228@gargle.gargle.HOWL> (message from Uday S Reddy on Thu, 30 Aug 2018 02:16:40 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229094 Archived-At: > Date: Thu, 30 Aug 2018 02:16:40 +0100 > From: Uday S Reddy > Cc: emacs-devel@gnu.org, > > In my view, the non-main threads asking for user interaction should be a > rarity. This would be an unfortunate limitation, since it means people will need to write code intended to run in non-main threads specially. As a corollary, many existing Lisp programs will have to be significantly rewritten to fit this scheme, before they can be safely run concurrently with some foreground job done by the main thread. The proverbial example is to be able to run Gnus in a non-main thread so that its slow reading of the newsgroups would not block Emacs. > Ideally, the main thread should do all the interaction that is > necessary, and then spawn the sub-threads with all the information > they need. I think this will be hard to do in Emacs, given the abundance of global state.