[m-dev.] Interleaved output in hlc.gc.par

Peter Wang novalazy at gmail.com
Thu Sep 17 17:00:27 AEST 2015


On Thu, 17 Sep 2015 16:36:42 +1000, Paul Bone <paul at bone.id.au> wrote:
> 
> Should a user reasonably expect calls to io.format to be atomic with respect
> to the IO state?  I ask because this creates an inconsistency.

I don't think so.  It is the user's responsibility to serialise any
concurrent uses of the stream.  It's not specific to io.format.
Two threads calling write_string may produce output with interleaved
characters, e.g. "Hweolrllod !"

Peter



More information about the developers mailing list