From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: streams are cool, you could stream virtually anything! Date: Thu, 05 Nov 2015 18:35:07 +0200 Message-ID: <83vb9gs8uc.fsf@gnu.org> References: <87ziyuaqhl.fsf@petton.fr> <87wptxog30.fsf@russet.org.uk> <87vb9ha0im.fsf@petton.fr> <87h9l0mxz9.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446741338 11301 80.91.229.3 (5 Nov 2015 16:35:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2015 16:35:38 +0000 (UTC) Cc: damien@cassou.me, nicolas@petton.fr, emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 05 17:35:29 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZuNVY-0004nx-Vl for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 17:35:29 +0100 Original-Received: from localhost ([::1]:33405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNVY-0007nI-Bc for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 11:35:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNVU-0007nD-1X for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:35:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuNVQ-0007oQ-Mh for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:35:23 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:51866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNVQ-0007nt-E1 for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:35:20 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NXC00500OEW7R00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Thu, 05 Nov 2015 18:35:18 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXC005E2OQU4X70@a-mtaout21.012.net.il>; Thu, 05 Nov 2015 18:35:18 +0200 (IST) In-reply-to: <87h9l0mxz9.fsf@russet.org.uk> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193316 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Date: Thu, 05 Nov 2015 12:28:42 +0000 > Cc: Damien Cassou , emacs-devel > > Emacs is single threaded, so the only thing that can change the buffer > during a while loop is the stuff in the while loop. Apologies if what I'm saying makes no sense for this particular discussion (I didn't track it), but such assumptions are generally incorrect, unless you have extremely tight control on the code inside that loop (read: you yourself wrote every single function it calls, and you know very well what you are doing). Otherwise, you might be in for a surprise. For example, code that calls sit-for or even read-event can invoke timers, which can do all kinds of things to your buffer. Even some primitive that calls QUIT could potentially do that, although not with the current code base (QUIT invokes atimers). There be dragons.