emacs-devel
[Top][All Lists]
Advanced

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

Re: `message' not outputting the newline "atomically"


From: Eli Zaretskii
Subject: Re: `message' not outputting the newline "atomically"
Date: Sun, 23 Jun 2019 17:51:13 +0300

> From: Stefan Monnier <address@hidden>
> Date: Sun, 23 Jun 2019 08:53:48 -0400
> 
> > What if Emacs crashes half way through that loop, because 'i' is
> > computed incorrectly?  With line buffering, we risk not seeing
> > anything.
> 
> Seeing none of the 32 bytes of fingerprint instead of only seeing the
> first N of them seems like a very minor inconvenient.

See my other message: seeing the full output could be priceless.
Besides, with the current buffering mode you might not see any of the
bytes at all.  (Not that this is a very important example, but I
didn't invent it.)

> Buffering can indeed be harmful, but only when significant
> computation/time can pass between the `fprintf` and the moment the
> corresponding text is "displayed", which is not the case here (nor
> anywhere else in Emacs's C code, according to my quick "grep stderr").

The time has no influence on this, because no stdio implementation
I've seen flushes buffers based on time since the last output.

> > So this looks like a net loss to me.
> 
> I don't have a strong opinion on this, but FWIW, I see a net gain and no
> significant loss.

I see a net loss.



reply via email to

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