From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: Re: User interaction from multiple threads Date: Fri, 24 Aug 2018 11:57:05 +0800 Message-ID: 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 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007f1ac50574265fba" X-Trace: blaine.gmane.org 1535082932 29591 195.159.176.226 (24 Aug 2018 03:55:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2018 03:55:32 +0000 (UTC) Cc: hw@adminart.net, gazally@runbox.com, psainty@orcon.net.nz, emacs-devel , emacs-devel-bounces+psainty=orcon.net.nz@gnu.org, Eli Zaretskii To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 24 05:55: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 1ft3C3-0007YM-Kh for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2018 05:55:27 +0200 Original-Received: from localhost ([::1]:39729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ft3E9-0000Pr-S4 for ged-emacs-devel@m.gmane.org; Thu, 23 Aug 2018 23:57:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ft3E2-0000PZ-7c for emacs-devel@gnu.org; Thu, 23 Aug 2018 23:57:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ft3E1-0003NX-AG for emacs-devel@gnu.org; Thu, 23 Aug 2018 23:57:30 -0400 Original-Received: from mail-it0-x22e.google.com ([2607:f8b0:4001:c0b::22e]:36708) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ft3Dw-0003KN-JB; Thu, 23 Aug 2018 23:57:24 -0400 Original-Received: by mail-it0-x22e.google.com with SMTP id p16-v6so435040itp.1; Thu, 23 Aug 2018 20:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D9nTdKhHfQ4zOhEC4ZAYi41NOFECv/RFO+TbHwFfebA=; b=J3FKG8iwmPE2tbL1RADeEINxjkIEyy/imSt/9C424FgD3tgV+JcNFobwTrVHK3h3yR ygdyrFrgespj3wZ+Zoos+9SqVow299xD2g/Jjrxs8c/XLeske+Zw8sTch5iGODT27rpr 8Mp4qy50VYdYQIy2tUXCLX0Sh3lTdXnVUGPRIdanfgjVaM0OpiKwXXyWkVPcEsMBRTI8 ej2YOfRVZnQBf19vKUs4kOgzbI/BnDoJ1ZTeYooWNixzWoEM0d/RkgMEkL1ffh0N65Hl xMG8gLZgeIp8FT6dE5W5h1xM0B4hWTqO6S2OPblat83nCo1kvL6kQ6vGqvRvVE60Vu0Y QIUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D9nTdKhHfQ4zOhEC4ZAYi41NOFECv/RFO+TbHwFfebA=; b=IK8wJz4mPaks6m7gIe9A7Ue9CtK9m2bi57YmLMc7LrF++EEQO8BYg+9D35NMLLoOIG gnzJoUuTUUGT5oytprPOZJ5KW5KA4Eal5tUVE8pIFsrqxON72hNIY5deNn5zOolsht1+ ZsRBJC16LPoqO+4pmuzNSxiiJtZCTbxFywMi5ioYZJqgrbq6ljQwNHxdrB5iKmBTEAMH b90IYAo9Qrs8jAnbEImXYq5LubJtWGUf8OrHMsbcfDxbiF4B2k5jC4CCe/XoFtEIMICc 0Gjgv7lzO5BcKSgM5zGMu7Wx0PC+EVDZ4fXRwk98W0af0EDtTAMMgFM0TabhinGiq8fY eYug== X-Gm-Message-State: APzg51AZVdV1wy2s/GhtiA3M3+FemsJCis41BBze0HHVvWIVScTe611j HgLdn34Ve1Eh0TSJdObWnmpnuy/Kr9b/U7xLwVm97A== X-Google-Smtp-Source: ANB0VdYLXGuQ9DoYXymyVrtKq1DdE03eSdM3OYjHkIyJ6Divx2/PyWLY0gUU9ZEVAf0cwCYbD47ycW6Op0D8c7bMlLY= X-Received: by 2002:a24:14d8:: with SMTP id 207-v6mr152171itg.41.1535083043295; Thu, 23 Aug 2018 20:57:23 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::22e 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:228862 Archived-At: --0000000000007f1ac50574265fba Content-Type: text/plain; charset="UTF-8" On Fri, 24 Aug 2018 at 10:02, Richard Stallman wrote: > > 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. > I think this is a very important point. We've seen with the development of numerous different Emacs libraries that people will come up with vastly improved variations of standard Emacs functionality if they are given the necessary tools to make it happen. Providing a comprehensive API to for controlling the queued interaction requests is probably more important than desiging the perfect UI for it. > > 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? > Threads do have names, but providing one is optional. The function signature is (FUNCTION &optional NAME). As for givng the toplevel function name, I'd expect most toplevel functions are actually LAMBDA forms. Regards, Elias --0000000000007f1ac50574265fba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, 24 Aug 2018 at 10:02, Richard Stallman <rms@gnu.org> wrote:

=C2=A0 > >= With multiple threads asynchonously requesting input, I have a feeling
=C2=A0 > > that users will get confused in complicated situations as = a result of
=C2=A0 > > not knowing which thread the input is for.

=C2=A0 > Yes, and I think we all agreed that some sort of serialization = is
=C2=A0 > needed.

We agree about the serialization, but the issue I am not talking about
now is different.=C2=A0 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.
=

I think this is a very important point. We've seen = with the development of numerous different Emacs libraries that people will= come up with vastly improved variations of standard Emacs functionality if= they are given the necessary tools to make it happen.

=
Providing a comprehensive API to for controlling the queued interactio= n requests is probably more important than desiging the perfect UI for it.<= /div>
=C2=A0
=C2=A0 >=C2=A0 =C2=A0And how (in what terms) would you suggest to indica= te the
=C2=A0 > 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?

Threads do have = names, but providing one is optional. The function signature is (FUNCTION &= amp;optional NAME).

As for givng the toplevel func= tion name, I'd expect most toplevel functions are actually LAMBDA forms= .

Regards,
Elias
--0000000000007f1ac50574265fba--