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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,a0224dc3d1e52f3d X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: Streams and Concurrency Date: 1999/01/04 Message-ID: <76qb23$ba3$1@platane.wanadoo.fr>#1/1 X-Deja-AN: 428607080 Content-Transfer-Encoding: 8bit References: <76c3tv$acs@bgtnsc02.worldnet.att.net> <76cat4$2ldc$1@news.gate.net> <76dn7b$a35@bgtnsc03.worldnet.att.net> <76fe92$46c$1@platane.wanadoo.fr> <76g9ds$ura$1@nnrp1.dejanews.com> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Organization: Adalog Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-01-04T00:00:00+00:00 List-Id: dewar@gnat.com a �crit dans le message <76g9ds$ura$1@nnrp1.dejanews.com>... >In article <76fe92$46c$1@platane.wanadoo.fr>, > "Jean-Pierre Rosen" wrote: >> Unfortunately, all IO operations are potentially >> blocking, and therefore not allowed from within a >> protected operation. >> To get the effect of mutual exclusion for procedures >> requiring potentially blocking operations, have a look at >> package Protection available from Adalog's components >> page (http://perso.wanadoo.fr/adalog/compo2.htm) > >By the way, JPR here seems to be making the mistake of >assuming that stream = stream_io, a common confusion. The >original question here related to a particular >implementation of streams that you have not seen, and you >do not know if it does any potentially blocking operations. > Of course not, but that particular exemple used Text_Streams and I took this opportunity to remind people of this often overlooked problem. Why, if it works on most compilers ? Because I hate concealed design decisions. Choosing between portability and efficiency (or in this case, ease of programming) is a trade-off, and it is perfectly acceptable to disregard portability as long as it is a concious design decision. But as you noticed, often people make this choice without being aware of it, and *this* is (IMHO) very bad. --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://perso.wanadoo.fr/adalog