From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: The event handling thread Date: Tue, 20 Dec 2016 17:04:36 -0800 Message-ID: References: <8360mj99oe.fsf@gnu.org> <83fulk610j.fsf@gnu.org> <83wpeu37nq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1482282325 2183 195.159.176.226 (21 Dec 2016 01:05:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2016 01:05:25 +0000 (UTC) User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.90 (darwin) Cc: lokedhs@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 21 02:05:21 2016 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 1cJVLL-0008Gz-O6 for ged-emacs-devel@m.gmane.org; Wed, 21 Dec 2016 02:05:19 +0100 Original-Received: from localhost ([::1]:54303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJVLQ-0005zA-8U for ged-emacs-devel@m.gmane.org; Tue, 20 Dec 2016 20:05:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJVKm-0005yv-DR for emacs-devel@gnu.org; Tue, 20 Dec 2016 20:04:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJVKl-0006rc-Ez for emacs-devel@gnu.org; Tue, 20 Dec 2016 20:04:44 -0500 Original-Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:35798) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJVKg-0006pm-Jr; Tue, 20 Dec 2016 20:04:38 -0500 Original-Received: by mail-pf0-x235.google.com with SMTP id i88so31224791pfk.2; Tue, 20 Dec 2016 17:04:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version; bh=weY8BEj9kXPpxGerhjKnelCYFkCp6Xq3Uzc8A0k2sG0=; b=eZFUX3bjEW1bvcffa6JXCpR/EnDISi6KfMds011MZk5Grc44got2ZvHgBr3CPSGoT7 nK8AVk30V055cFJp4LRdJ/7lmjTcrGVOkUpaNPpvza5kx7A57475/PB0mxy99VgaALQT oXvsSOR5paCGkQu5lO2l/rBzzfVJxE/Z9dlXpYMD3cr2v4/I29O7MgtcUqnfc4l7iaRW nhcJKiuVzJZ8w/imCyIwyCqNxJ6lCLNc0cHLUy09mFRRJuLsdo+cwqnmEaX0sp/QzTtG 3B2xv+sLyOuqF/4rpzBJ1PCUHVBj4dkjI64Ll5PGY9keI8dyXDdHqmFcUDWVcqfcReUh ZSew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mail-followup-to:mime-version; bh=weY8BEj9kXPpxGerhjKnelCYFkCp6Xq3Uzc8A0k2sG0=; b=X+0AzI2N3C2QNjULeMztBNjYBzYcCHsiR5TWYq95LzZPlRtsKDbVQ68kgPNL4aNP6n zF7K4rGbdy1PDkMjNOGIXav27l1Ikr2B212DQovbnDNyqhVjaOhEJ8hqyfFu4sUhePS+ o9t4ZOuafyhLUgTLLV6vTftNVB0amEfFk3ENeFy6aY0uKy3HOmGpHytfCoU2ny/ou0gv ZMWc0uEY6keEf1pW+5feI+GPkwoDwPS2QRsVOErSIdUg56D69xKi7GKrAKNq9XsEiplx JwNR/WHttvJ0tOEa7HkEvCr3DfpVcuGdOBgjzlL3G8mPR8f4loS5B5D7SOGsL6lszegZ 9KBw== X-Gm-Message-State: AIkVDXI4+oq7iK7VgPDMc2XpwC3arSMl5oe8v+wLC1i+aFVePjuBFyTTxRNTYrrBKDSjEw== X-Received: by 10.98.16.7 with SMTP id y7mr1785798pfi.55.1482282275959; Tue, 20 Dec 2016 17:04:35 -0800 (PST) Original-Received: from Vulcan.local (76-234-69-149.lightspeed.frokca.sbcglobal.net. [76.234.69.149]) by smtp.gmail.com with ESMTPSA id t89sm41724960pfe.50.2016.12.20.17.04.34 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 20 Dec 2016 17:04:34 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id D654B4D2D738; Tue, 20 Dec 2016 17:04:37 -0800 (PST) In-Reply-To: <83wpeu37nq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Dec 2016 18:08:25 +0200") Mail-Followup-To: Eli Zaretskii , lokedhs@gmail.com, emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::235 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:210679 Archived-At: >>>>> Eli Zaretskii writes: > To see the above machinery in action, try this: > (defun infloop () > (with-temp-buffer (while t (insert "foo")))) > (make-thread #'infloop "thread-loop") > As soon as you start the looping thread, any keyboard input, like M-x or > cursor motion commands, doesn't have any effect, until you type C-g (which > causes the looping thread to exit), because the looping thread never yields. Ah, this is the bit I was missing. It's clear to me now, thanks. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2