From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,534dd301375921ac X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.191.225 with SMTP id hb1mr8715943pbc.5.1339829365414; Fri, 15 Jun 2012 23:49:25 -0700 (PDT) Path: l9ni56383pbj.0!nntp.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Is Text_IO.Put_Line() thread-safe? Date: Sat, 16 Jun 2012 07:49:26 +0100 Organization: A noiseless patient Spider Message-ID: References: <93201f1a-d668-485e-83b4-492bc283f36e@googlegroups.com> <3fff1269-06f5-47a2-bc10-c2145b3a297d@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="VkRmmmXzMj956AdxXtqrqg"; logging-data="13170"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GB3nFI4iJZrU58jzCIsLylkfi9dWkJDA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (darwin) Cancel-Lock: sha1:R+fzHv+5BPWuJy/VycPe2AUB3Wk= sha1:i2/03s7NMTUExGM5mkve3nQ7yxE= X-Received-Bytes: 1775 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Date: 2012-06-16T07:49:26+01:00 List-Id: "J-P. Rosen" writes: > Le 16/06/2012 04:00, BrianG a écrit : >> On the Put_Line issue, why not simply wrap it in a protected object > Because all IO's are potentially blocking operations. > > By all means, use a task and a rendezvous! Simple, no problem, it works. > PO are for simple, relatively low level stuff (in general). Rendezvous > are generally better for high level synchronization. I feel more comfortable it the output requests are queued, so a PO wrapping a queue with an outputter task seems natural. Or, nowadays, a synchronized queue (but note, that's for definite types only, not so good for strings).