comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <alejandro@mosteo.com>
Subject: Re: Private or public task ?
Date: Tue, 09 Feb 2010 15:44:17 +0100
Date: 2010-02-09T15:44:17+01:00	[thread overview]
Message-ID: <7tdap6F251U1@mid.individual.net> (raw)
In-Reply-To: e714f043-9fed-4e2b-b3d2-180b0364f0cf@d27g2000yqn.googlegroups.com

Maciej Sobczak wrote:

> On 5 Lut, 22:53, Hibou57 (Yannick Duchêne) <yannick_duch...@yahoo.fr>
> wrote:
> 
>> I did not ever suspected such a requirement. Transitive blocking is
>> not allowed ?
> 
> As far as I understand, there is a careful wording around this subject
> so that formally speaking protected operations (except for entries)
> are not themselves "blocking". So, for example, you can call protected
> operations from other protected operations.

And this makes sense: if you don't allow anything blocking inside a 
protected procedure, it follows that the procedure is itself non-blocking :)

Entries, on the other hand, are blocking... because you don't know if you'll 
be blocked on the entry conditional. This is true even for non-conditional 
entries, I think, because of possible requeues.

Alex.

> The operations that are considered to be blocking in this context are
> delay statements, entry calls, select statements and... I/O
> operations. These cannot be called from protected operations.
> 
> (I'm sure somebody will correct me if I'm off tracks)
> 
>> So, if blocking operation are not allowed from a protected type,
>> clients of a given operation have to know it weither or not it's
>> potentially blocking,
> 
> That would be nice, yes. But be careful, this approach might blow up
> the language. What about exception specifications? And so on.
> 
> But: see RavenSPARK.
> 
> The problem with blocking in particular is that there is no way to
> verify whether imported subprograms (from C libraries, for example)
> are blocking. You can import I/O operations from C libraries and there
> is no way to verify what they do.
> 
> --
> Maciej Sobczak * www.msobczak.com * www.inspirel.com
> 
> Database Access Library for Ada: www.inspirel.com/soci-ada




  parent reply	other threads:[~2010-02-09 14:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 20:54 Private or public task ? Hibou57 (Yannick Duchêne)
2010-02-05 20:56 ` Hibou57 (Yannick Duchêne)
2010-02-05 21:38 ` Jeffrey R. Carter
2010-02-05 21:53   ` Hibou57 (Yannick Duchêne)
2010-02-08  9:55     ` Alex R. Mosteo
2010-02-08 10:02     ` Jean-Pierre Rosen
2010-02-08 17:28     ` Maciej Sobczak
2010-02-09  8:43       ` Dmitry A. Kazakov
2010-02-09 12:07       ` Hibou57 (Yannick Duchêne)
2010-02-09 14:26         ` Jean-Pierre Rosen
2010-02-09 18:17           ` Hibou57 (Yannick Duchêne)
2010-02-10  8:17           ` Maciej Sobczak
2010-02-10  8:29             ` Hibou57 (Yannick Duchêne)
2010-02-10  8:40               ` Martin
2010-02-10 11:44                 ` Jean-Pierre Rosen
2010-02-10 12:51                   ` Martin
2010-02-10 16:17                 ` Robert A Duff
2010-02-10 11:38             ` Jean-Pierre Rosen
2010-02-13 11:09           ` Dmitry A. Kazakov
2010-02-09 15:20         ` Robert A Duff
2010-02-09 18:26           ` Hibou57 (Yannick Duchêne)
2010-02-09 14:44       ` Alex R. Mosteo [this message]
2010-02-09 23:38   ` mkasun
2010-02-09 23:51     ` Robert A Duff
2010-02-10  0:01     ` Jeffrey R. Carter
2010-02-05 21:40 ` Dmitry A. Kazakov
2010-02-05 22:09   ` Hibou57 (Yannick Duchêne)
2010-02-05 22:57     ` sjw
2010-02-06  2:20   ` Hibou57 (Yannick Duchêne)
2010-02-06  2:23     ` Hibou57 (Yannick Duchêne)
2010-02-06  3:29     ` Jeffrey R. Carter
replies disabled

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