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: a07f3367d7,6327f05d4989a68d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.96.231 with SMTP id dv7mr8372669wib.6.1356837414232; Sat, 29 Dec 2012 19:16:54 -0800 (PST) Path: i11ni337243wiw.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.131.MISMATCH!xlned.com!feeder3.xlned.com!news.astraweb.com!border6.a.newsrouter.astraweb.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Press Release - Ada 2012 Language Standard Approved by ISO Date: Thu, 27 Dec 2012 11:48:50 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <7wrdmbre6jw9.qww9l0uzj6mg.dlg@40tude.net> <14oqoq06zhlu2.tcasif3hdyhw.dlg@40tude.net> <1drh1q1ln2dfh$.a9hwlg01fjfy.dlg@40tude.net> <50d6365d$0$6577$9b4e6d93@newsspool3.arcor-online.net> <1pbg79bz92j3t$.sz41zduivjfp.dlg@40tude.net> <4c101d74-c8cb-45a6-82d4-91923bb950b0@googlegroups.com> <87sj6tre9s.fsf@mid.deneb.enyo.de> <895c9eb7-03f8-4b0c-96b4-3dbd7a315ccd@googlegroups.com> Mime-Version: 1.0 Injection-Date: Thu, 27 Dec 2012 18:48:50 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="3f4eb2af76c3de211f80e174daf29eb8"; logging-data="26299"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JokpHBlEPP3uSpnJ2rEq08IL2b6nDwTU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:kAG4SviPZlt381JFsX0Jef2BZxQ= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-12-27T11:48:50-07:00 List-Id: On 12/27/2012 08:30 AM, Dmitry A. Kazakov wrote: > > > And a nice race condition coming with that! Never use File_Exists if you > can. Precisely. Multiple processes may access the file system at the same time. The idea that you can check the precondition to an operation and have the result still hold when you invoke the operation is only valid for sequential activities; when you're using a concurrent language like Ada then there are often cases when that's a race. The Get operation for a concurrent, non-blocking queue has the precondition "not Is_Empty", but between checking that and invoking Get another task may have changed the state of the queue. -- Jeff Carter "He didn't get that nose from playing ping-pong." Never Give a Sucker an Even Break 110