From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Shahid Newsgroups: gmane.emacs.devel Subject: Re: User interaction from multiple threads Date: Wed, 29 Aug 2018 22:34:02 -0400 Message-ID: <87bm9kr3ad.fsf@gmail.com> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535596374 21834 195.159.176.226 (30 Aug 2018 02:32:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 30 Aug 2018 02:32:54 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: Gemini Lasswell , Eli Zaretskii , emacs-devel@gnu.org To: Phil Sainty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 30 04:32:49 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 1fvClN-0005WM-Dx for ged-emacs-devel@m.gmane.org; Thu, 30 Aug 2018 04:32:49 +0200 Original-Received: from localhost ([::1]:46563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvCnT-0005ru-6U for ged-emacs-devel@m.gmane.org; Wed, 29 Aug 2018 22:34:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvCmk-0005re-0c for emacs-devel@gnu.org; Wed, 29 Aug 2018 22:34:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvCmf-0002Ry-1r for emacs-devel@gnu.org; Wed, 29 Aug 2018 22:34:13 -0400 Original-Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:33446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fvCme-0002Rm-St; Wed, 29 Aug 2018 22:34:08 -0400 Original-Received: by mail-qk0-x22e.google.com with SMTP id z78-v6so4819441qka.0; Wed, 29 Aug 2018 19:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=Qd4T2jw42OAA9zHIh/VVedmMn4hQbo00u409Q2Iy4WM=; b=E9x9AoE5WugVyHWNDnRkFl3L2lPThGfAHnwe6DrMXMLyaFakeJo45HVzSr+0z8dYhw Vz6Y6pg1qyR44NvLHIPeWEvwiHbfvCHk8Ex6dSg5jTwcD2PWy2q5WqZuENQ7KbUK0Vqg PR29CnOJcAq24aOhP8HOOaVBcstqKLo4C9FEHb/p4IN1mwwClHxjgMBO9Bxi0cG32c3A 8Btf9cnQqMhURHJnQDFPq1U6YD+mjc0PwDRFdRjX06jtNSE0Y8ylZW29Io+jcCSY9VjA 9I8HJ3ZyiPzFBbKjf9nOPDWPcsYnfP3DL46gJSjd1OqW8OoblJ98fm8H509RtI+X7XOD /qbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=Qd4T2jw42OAA9zHIh/VVedmMn4hQbo00u409Q2Iy4WM=; b=oyymjXayER/h7ZvIqdZY2Dt/DDpWoH1yG31Q8SfW9/CYxUO8Vo0JEuJyBauXNY2KpJ zCZ1699BHY24XnpA+wqlnd5DzpjTqlxqs6tAYiEeBzTrxE9G1GVqnAJeU3ye99WPjEmU ygQYCSQ4a12eMrhRlFy4jZkVTAJ+r4H2yZegcLyVX0jbQWkwg4nEfg1OUEsVkmzYXPHd SR4MD4CynrLTuVBjuE7rkYpdUJeJS8qSiZoyhl8HSgXRfV4/3V6wSvEW0ECxRNRXIFsQ NFN2WOM2dAopufxX+Cq3KYNCEzB16bdwa9rEjnW3ESZ/jtrO8aQR+7xPqb1CNV5r2e4+ LKNw== X-Gm-Message-State: APzg51Ch4N14ZhwOcVgm7gDVaf2KDlbYUENlf2PDMt8yxtJa2tXSxUZZ FXUP0U+vjOgP/gIDBi9RqBrmhn3h X-Google-Smtp-Source: ANB0VdYSg+4W1IBAcMfW2ZpwW+aNrdIhyeeKwuuD3SOH88GTZ0iUzVkgbWUJ1HkrfntcUluiXwUfhQ== X-Received: by 2002:a37:8dc2:: with SMTP id p185-v6mr9035111qkd.53.1535596447894; Wed, 29 Aug 2018 19:34:07 -0700 (PDT) Original-Received: from amun (cpe-104-162-86-217.nyc.res.rr.com. [104.162.86.217]) by smtp.gmail.com with ESMTPSA id e65-v6sm3090781qkf.39.2018.08.29.19.34.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 19:34:07 -0700 (PDT) In-reply-to: <3c3e954d-65fc-58e6-9165-1c775ead69a2@orcon.net.nz> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::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:229086 Archived-At: Phil Sainty writes: > On 30/08/18 05:36, John Shahid wrote: >> The child thread can request the main thread to display a prompt and >> return the value that the user entered. > > The notion of user interaction all happening on the main thread was > proposed earlier, and it was pointed out that it's very difficult to > do that, because the user interaction may involve arbitrary data which > is local to the originating thread. I thought closures would solve such a problem by encapsulating the context. I imagine the main thread receiving forms from other threads evaluating them and returning the results back to the thread which becomes the value of the `(on-main-thread ...)`. What did I miss ?