comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: About task-safeness
Date: Thu, 3 Feb 2011 09:33:58 +0100
Date: 2011-02-03T09:33:59+01:00	[thread overview]
Message-ID: <1qhisymwdgu72$.zcpjn6rqiw74.dlg@40tude.net> (raw)
In-Reply-To: alpine.WNT.2.00.1102021733070.5716@WHIRLWIND

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



  reply	other threads:[~2011-02-03  8:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 20:51 About task-safeness mockturtle
2011-02-02 21:01 ` Vinzent Hoefler
2011-02-02 21:14   ` mockturtle
2011-02-02 22:16     ` Maciej Sobczak
2011-02-02 22:28       ` Shark8
2011-02-02 22:40         ` Peter C. Chapin
2011-02-03  8:33           ` Dmitry A. Kazakov [this message]
2011-02-03 17:59       ` Vinzent Hoefler
2011-02-02 22:38 ` J-P. Rosen
2011-02-03  2:44 ` Randy Brukardt
2011-02-03  8:53   ` Niklas Holsti
2011-02-03 11:07     ` Georg Bauhaus
2011-02-03 11:22       ` AdaMagica
2011-02-03 18:13         ` Jeffrey Carter
2011-02-04  0:33     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox