[erlang-questions] Flush "stdout" buffer

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Sun Sep 3 12:33:45 CEST 2017


On Sun, Sep 3, 2017 at 8:30 AM Michael Truog <mjtruog@REDACTED> wrote:

>
> When you call a function in the io module, what happens?  An io:format/1
> function call sends the data in an Erlang message and that Erlang message
> goes into the group leader's Erlang process message queue, to get received
> when the Erlang process is ready for it.  That use of the Erlang process
> message queue is a form of buffering, ignoring everything that happens
> after that in the group leader Erlang process.
>
>
It is definitely asynchronous communication with latency.

I don't think it is buffering, however, albeit that is a bit philosophical.
As soon as the message arrives, it is sent on. In no place do you delay the
write in the hope that more data arrives shortly. If anything it acts like
a queue, not a buffer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170903/996f62f0/attachment.htm>


More information about the erlang-questions mailing list