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: Fri, 24 Aug 2018 12:20:30 +0300 Message-ID: <83h8jk9l41.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> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1535102351 13963 195.159.176.226 (24 Aug 2018 09:19:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2018 09:19:11 +0000 (UTC) Cc: psainty@orcon.net.nz, hw@adminart.net, gazally@runbox.com, emacs-devel-bounces+psainty=orcon.net.nz@gnu.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 24 11:19:06 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 1ft8FB-0003J5-52 for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2018 11:19:01 +0200 Original-Received: from localhost ([::1]:40615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ft8HH-0001IU-IU for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2018 05:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ft8H5-0001Ht-79 for emacs-devel@gnu.org; Fri, 24 Aug 2018 05:21:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ft8H4-0006NB-Dx for emacs-devel@gnu.org; Fri, 24 Aug 2018 05:20:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ft8Gw-0006H2-LZ; Fri, 24 Aug 2018 05:20:50 -0400 Original-Received: from [176.228.60.248] (port=2413 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ft8Gq-0004su-A3; Fri, 24 Aug 2018 05:20:44 -0400 In-reply-to: (message from Richard Stallman on Thu, 23 Aug 2018 22:00:03 -0400) 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:228866 Archived-At: > From: Richard Stallman > Cc: psainty@orcon.net.nz, hw@adminart.net, emacs-devel@gnu.org, > emacs-devel-bounces+psainty=orcon.net.nz@gnu.org, > gazally@runbox.com > Date: Thu, 23 Aug 2018 22:00:03 -0400 > > > > With multiple threads asynchonously requesting input, I have a feeling > > > that users will get confused in complicated situations as a result of > > > not knowing which thread the input is for. > > > Yes, and I think we all agreed that some sort of serialization is > > needed. > > We agree about the serialization, but the issue I am not talking about > now is different. I am talking about managing the various input > requests -- choosing the order of the requests, and identifying which > request is being made now and on behalf of which activity. The idea expressed by several people is that once you start interacting with some thread's prompt, the other threads are locked out of interaction, until the interacting thread is done with the series of prompts that allow it to go on with its business. > > Why is that important? Wouldn't the prompt itself be informative > > enough? > > We can hardly assume that the prompt shows which activity is asking > for the input. What if two different threads ask for a Password? > The prompt might say, "Password: ". Which password should it be? If that's the first prompt in a series of prompts, we should fix the prompt to tell what password does it ask for. But it is okay, I think, to have a series of prompts from a single thread which go like this: Host to logon: Password: Initial directory: As long as the user knows this is a coherent series of prompts from the same thread, she will have no difficulty filling in the blanks, exactly like she does that now. > > And how (in what terms) would you suggest to indicate the > > thread ID in this case? > > I don't know enough about the thread feature to figure that out. > Perhaps based on the thread's top-level function call? > Do threads have names? They do, but the name is optional. If the Lisp program that starts a thread doesn't provide a name, Emacs will identify it as something like #, which is not helpful in the situations we are discussing. And even if we do require each thread to have a name, what guarantees do we have that the name will be more informative than the prompts about which you were worried?