comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Blocking syscalls in Tasks
Date: Sat, 27 Sep 2008 14:54:48 -0700 (PDT)
Date: 2008-09-27T14:54:48-07:00	[thread overview]
Message-ID: <a82896d3-992e-46db-9985-cd26a22e9e86@k13g2000hse.googlegroups.com> (raw)
In-Reply-To: 49dd14a0-73b9-44b4-a599-c86da7229c6c@f36g2000hsa.googlegroups.com

On 27 Wrz, 19:26, schwer...@gmail.com wrote:

> Are tasks commonly implemented using threads

You should expect that from the quality implementation. This not only
gives some nice properties for potentially blocking I/O calls (exactly
- that only the calling task gets blocked), but also allows to safely
use system-level synchronization primitives (like mutexes) for
interactions between tasks.
Not that this would be recommended over standard Ada mechanisms, but
it might actually happen even behind the scenes when using some
external library. Knowing that Ada tasks are just system threads in
disguise allows to use such libraries safely. Without this guarantee
the interoperability of Ada would be limited.

On the other hand, even this assumption (that tasks are threads in
disguise) is not enough to assert that Ada code can be safely executed
by threads that do not originate from or at least where not prepared
by the Ada runtime, althought in a quality implementation this might
be a very welcome property.
I don't know whether GNAT provides this property.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



  parent reply	other threads:[~2008-09-27 21:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-27 17:26 Blocking syscalls in Tasks schwering
2008-09-27 18:40 ` Peter C. Chapin
2008-09-27 20:11   ` schwering
2008-09-27 23:14     ` Peter C. Chapin
2008-09-27 18:58 ` Hibou57 (Yannick Duchêne)
2008-09-27 20:02   ` schwering
2008-09-27 20:16     ` Ed Falis
2008-09-27 21:54 ` Maciej Sobczak [this message]
2008-09-28  7:55   ` sjw
2008-09-28  3:16 ` anon
2008-09-28 17:48   ` tmoran
2008-09-28 23:39     ` anon
2008-09-30  2:35       ` Randy Brukardt
2008-09-30 10:06         ` anon
2008-09-30 11:01           ` Georg Bauhaus
2008-10-01  2:18             ` anon
2008-09-30 18:06           ` Adam Beneschan
2008-09-30 18:10             ` Ludovic Brenta
2008-09-30 20:09               ` Jeffrey R. Carter
2008-10-06 17:12           ` Ada compilers supporting Ada 2005 (was: Blocking syscalls in Tasks) Georg Bauhaus
2008-10-07 11:51             ` Colin Paul Gloster
2008-10-07 14:31               ` Britt Snodgrass
2008-10-07 15:39                 ` Colin Paul Gloster
2008-10-07 16:38                   ` Adam Beneschan
replies disabled

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