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: Sat, 01 Sep 2018 10:00:38 +0300 Message-ID: <831sad3dnt.fsf@gnu.org> References: <838t59j821.fsf@gnu.org> <87lg92q7ih.fsf@runbox.com> <87bm9xqg46.fsf@runbox.com> <838t51dl10.fsf@gnu.org> <87efehqdlv.fsf@gmail.com> <3c3e954d-65fc-58e6-9165-1c775ead69a2@orcon.net.nz> <87bm9kr3ad.fsf@gmail.com> <83y3co0zmb.fsf@gnu.org> <875zzrrg5b.fsf@gmail.com> <83k1o721qm.fsf@gnu.org> <874lfbr4oy.fsf@gmail.com> <87wos6usif.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1535785182 10264 195.159.176.226 (1 Sep 2018 06:59:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Sep 2018 06:59:42 +0000 (UTC) Cc: psainty@orcon.net.nz, jvshahid@gmail.com, emacs-devel@gnu.org To: Gemini Lasswell Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 01 08:59:38 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 1fvzsf-0002Y7-DT for ged-emacs-devel@m.gmane.org; Sat, 01 Sep 2018 08:59:37 +0200 Original-Received: from localhost ([::1]:59808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvzul-00085O-Pq for ged-emacs-devel@m.gmane.org; Sat, 01 Sep 2018 03:01:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvztx-00085B-0t for emacs-devel@gnu.org; Sat, 01 Sep 2018 03:00:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvztt-0007Og-1C for emacs-devel@gnu.org; Sat, 01 Sep 2018 03:00:56 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvztr-0007OB-7x; Sat, 01 Sep 2018 03:00:52 -0400 Original-Received: from [176.228.60.248] (port=1681 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fvztq-0004t7-PV; Sat, 01 Sep 2018 03:00:51 -0400 In-reply-to: <87wos6usif.fsf@runbox.com> (message from Gemini Lasswell on Fri, 31 Aug 2018 14:37:44 -0700) 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:229156 Archived-At: > From: Gemini Lasswell > Cc: Eli Zaretskii , psainty@orcon.net.nz, emacs-devel@gnu.org > Date: Fri, 31 Aug 2018 14:37:44 -0700 > > I'm still developing my understanding of all this as well, and one > important point that wasn't obvious to me at first is that each thread > has its own special binding stack. This is the m_specpdl field of > thread_state, and is described a bit in lisp.h. In addition to > unwind-protects and the Lisp backtrace, it keeps track of > dynamically-bound variables, the values of which are local to each > thread. > > The implication of this for the scenario of having a non-main thread ask > the main thread to prompt on its behalf is that not just buffer-local > variables but other global variables, and anything cl-letf can bind > (including function definitions) would have to be communicated between > the threads. Indeed, and that makes this proposal a very complicated one at best.