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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4fe1e6b66c35dfe2 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: About task-safeness Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <3195b61d-e545-454d-8516-4ba16b490df0@glegroupsg2000goo.googlegroups.com> Date: Thu, 3 Feb 2011 09:33:58 +0100 Message-ID: <1qhisymwdgu72$.zcpjn6rqiw74.dlg@40tude.net> NNTP-Posting-Date: 03 Feb 2011 09:33:59 CET NNTP-Posting-Host: c12bcf8b.newsspool3.arcor-online.net X-Trace: DXC=48l?b\b=8bbEB;5>eE0T7mMcF=Q^Z^V3h4Fo<]lROoRa8kFT\^nE^;mi[6LHn;2LCVn7enW;^6ZC`d\`mfM[68DCc?>C4]\S2@;f X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16838 Date: 2011-02-03T09:33:59+01:00 List-Id: On Wed, 2 Feb 2011 17:40:46 -0500, Peter C. Chapin wrote: > On Wed, 2 Feb 2011, Shark8 wrote: > >>> two tasks "only reading" values from the same container are *not* safe . >> >> Interesting! That is counter-intuitive; do you have a link to an >> example/explaination? > > Actually, in the absence of documentation to the contrary, I wouldn't expect > simultaneous reads to be safe. Some data structures get modified internally > in response to reads. Which is equivalent to say that the implementation is not reentrant. Reentrant is not an equivalent of task-safe. A protected action is not reentrant per design. But it is task-safe because it locks. Unsafe are only non-reentrant operations which do not lock (the effect is not atomic). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de