From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: User interaction from multiple threads Date: Sun, 19 Aug 2018 11:17:09 +0200 Message-ID: <5B793595.7050400@gmx.at> References: <838t59j821.fsf@gnu.org> <5B73DF10.5070200@gmx.at> <87muto5998.fsf@gmx.de> <5B73ED7E.5000102@gmx.at> <87in4b6hwf.fsf@gmx.de> <5B741C4E.6060403@gmx.at> <83sh3fin70.fsf@gnu.org> <5B756C41.1040600@gmx.at> <83a7pmifvd.fsf@gnu.org> <5B76782F.6060303@gmx.at> <83mutlh1s8.fsf@gnu.org> <5B7688AE.70205@gmx.at> <83h8jtgxwe.fsf@gnu.org> <5B77D94A.9000801@gmx.at> <83k1oof29s.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1534670699 18872 195.159.176.226 (19 Aug 2018 09:24:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2018 09:24:59 +0000 (UTC) Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 19 11:24:55 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 1frJx8-0004mr-6r for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2018 11:24:55 +0200 Original-Received: from localhost ([::1]:42206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frJzE-0004ex-7R for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2018 05:27:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frJpl-0005Ue-8C for emacs-devel@gnu.org; Sun, 19 Aug 2018 05:17:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frJpk-000286-Hd for emacs-devel@gnu.org; Sun, 19 Aug 2018 05:17:17 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:37879) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frJpg-0001zE-Vu; Sun, 19 Aug 2018 05:17:13 -0400 Original-Received: from [192.168.1.101] ([46.125.250.76]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MWTSA-1fKtoa33Mo-00XbD8; Sun, 19 Aug 2018 11:17:10 +0200 In-Reply-To: <83k1oof29s.fsf@gnu.org> X-Provags-ID: V03:K1:TocX6LvZTLXGipJnJGTNIeh9WhJ4VnusA5qoM6Brw9mMTabnFxp avPBfL4dcU4LACAoZpZwNmSD2ihdHHJ0CnrdyYtXsJXYt0I9CPkSonIvOjuis8plqqxykzi /51rX5MRwXSqkHv+xFbYlzIQj7sSGO8DWYohkunnavGRvhelWcxgrrtaYbCDSlcJowHlF28 BxzucCS4Y/hjCnTmJqcIw== X-UI-Out-Filterresults: notjunk:1;V01:K0:1XtPI10X+FY=:0ok96cQFFhamymuX1OelvC 7P3DvQkLltAuY38zDrm1eOgbtt9/74YErafJjVoBo5GFUfHMlvWo12YM2A1N40FfiwMaNJeQA 02BVmsddvzyIVPtOKqSXIKMVjFmcEX1aZcS0OM8vYmeZTASyIC+G6Go2l8J6TBld0+ER0csnM 1QL7hbOgSkzDfe1a5RIlt4YOO38LeLvTFw4dMUTAPiY1y8FmrMOMR1qgePwzaNBzqtaNGftdO keu5skTbncUoSGpYLRgW2vy7vLuGNjq2a6+jDdFH4wdcvnmhZ2dHR4uqnMtxpX3RAuhvtbmAc nhEKlfbQemGMffOpScJpTGcpQiQlGHAfo8IkSd7vyqgR6OkkHygCTXpyT/6PuQHNwojAmXiNC m0yiF9x6tvBE9VgOmPAQOIBYSf7yPXMsIBsk30MLe5DKzCI+dywV0pXTKJEMN4yGRXxzpMlB3 Ol67gYFa1szpTHNlt8l3Hc6l8wekdiilnTt6qFe+d4hoUpMH6PZf0pbjXCoWz0q1tDgPgX5uD QmK7qo6YU7qnWl5Ma+BsGgL6kQJdnrRJbkhaQLiBERxkeCZJRuatFvckni+AfqdrXt94d0saO rnyfm8OWgfhRNF2NF/5QcApwnS+MMX8EPehg4dlg0ol+Q6HNcnRQQ2ta4RMArWvuCbQotCrw/ t8ASdQhZi+Sd2Tu8fYJ2oeY0+0+pfPX0tKvoVn5jjuiw31X0MDGOaQzNiDASbNY2N/Y55NUFL ZeACB/ObMzaoSqMBFUqR3dcuGfCmOuhS3ogpU8/f1GoVFIXstIodNm/R5flLha8NB2Qz7z8u X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:228676 Archived-At: > Unless I'm misunderstanding you, this has everything to do with > threads, because the input from the newly-selected frame should be > processed by a different thread than the one which was "current" > before the switch. By design, reading input separately for a specific frame would not be necessarily tied to a thread. Once complete, the input could be stored somwhere and later be processed by the main thread. Only if a frame is actually owned by a thread, its input would eventually be passed to that thread. > thread-signal signals an error (like 'signal' does), so the signaled > thread will exit as soon as it resumes running, which is not what you > want. That's why I mentioned thread-yield. Then it's probably 'thread-yield' as you mentioned. I thought 'thread-signal' would allow to resume a specific blocked thread. I see now that I was wrong. > What does "left to the thread's writer" mean in this context? Given > the low-level details involved, which cannot be done from Lisp, how > can we leave this to the application? I'm probably missing something. When someone like Michael fires off 250 threads at the same time, we probably need some way to turn off eager frame creation or turn off frame creation at all by setting some buffer display option. By default I would create frames lazily, with frame creation turned off and eager frame creation as thread specific options. Once a setting has been made for a specific thread, the low-level routines have to act as prescribed by that setting. >> > What will appear in the minibuffer window of the previously-selected >> > frame while we interact with another thread's frame? >> >> If the previously-selected frame was that of the main thread, whatever >> the main thread currently does. > > I don't think this can fly with how redisplay works, can it? If the main thread's frame is not selected, we do not care much, do we? If it's selected, we do whatever we already do now. Why do you think redisplay enters here? What am I missing? martin