[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: streams are cool, you could stream virtually anything!

From: Eli Zaretskii
Subject: Re: streams are cool, you could stream virtually anything!
Date: Thu, 05 Nov 2015 18:35:07 +0200

> From: address@hidden (Phillip Lord)
> Date: Thu, 05 Nov 2015 12:28:42 +0000
> Cc: Damien Cassou <address@hidden>, emacs-devel <address@hidden>
> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]