<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 8, 2020 at 6:55 AM Jörg F. Wittenberger <<a href="mailto:Joerg.Wittenberger@softeyes.net">Joerg.Wittenberger@softeyes.net</a>> wrote:<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">    (define (make-pipe)<br>
      (open-u8vector-pipe '(buffering: #f) '(buffering: #f)))<br></blockquote><div><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">This means that there is no buffering inside Gambit, which is almost always what you want.</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    (receive (in out) (make-pipe)<br>
      (display "foo" out) ;; I'd expect this to block,<br>
      (force-output out) ;; but even this does not.<br>
      "too bad")<br></blockquote><div><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">The force-output has no effect because it flushes the Gambit buffers, but you have already disabled them.</div><div><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">However, Posix pipes also have buffers inside, and you can write up to PIPE_BUF bytes atomically before you can be blocked.  The value of PIPE_BUF depends on your OS, but on Linux it is 64K by default.  This is actually harmless, though.  Unlike a stdio buffer, as soon as there are any bytes in the pipe the receiving end can pull them out, so there is no need to ever flush the pipe itself.</div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><br></div><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large">John Cowan          <a href="http://vrici.lojban.org/~cowan">http://vrici.lojban.org/~cowan</a>        <a href="mailto:cowan@ccil.org">cowan@ccil.org</a><br>"Repeat this until 'update-mounts -v' shows no updates.<br>You may well have to log in to particular machines, hunt down<br>people who still have processes running, and kill them."<br></div></div></div>