From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: About task-safeness
Date: Wed, 2 Feb 2011 14:16:09 -0800 (PST)
Date: 2011-02-02T14:16:09-08:00 [thread overview]
Message-ID: <ffe8a425-eade-4403-8b89-b8aa844095fb@z31g2000vbs.googlegroups.com> (raw)
In-Reply-To: 3195b61d-e545-454d-8516-4ba16b490df0@glegroupsg2000goo.googlegroups.com
On Feb 2, 10:14 pm, mockturtle <framefri...@gmail.com> wrote:
> > Well, ARM 05, A(3/2) says:
>
> > |The implementation shall ensure that each language-defined subprogram is reentrant in
> > |the sense that concurrent calls on the same subprogram perform as specified, so long
> > |as all parameters that could be passed by reference denote nonoverlapping objects.
>
> > Apart from that, you probably have to trust the programmer - or some tool.
>
> Thank you, that is what I needed.
Note that this is actually quite weak guarantee. It says that any call
that refers to the same object need not be task-safe, even if a common
sense would suggest otherwise. It was already discussed here, but two
notable examples that are worth to keep in mind are:
- two tasks printing something on stdout are *not* safe
- two tasks "only reading" values from the same container are *not*
safe
You need to provide your own protection in such cases.
--
Maciej Sobczak * http://www.inspirel.com
next prev parent reply other threads:[~2011-02-02 22:16 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 [this message]
2011-02-02 22:28 ` Shark8
2011-02-02 22:40 ` Peter C. Chapin
2011-02-03 8:33 ` Dmitry A. Kazakov
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