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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,385c146dd3112519 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Private or public task ? Followup-To: comp.lang.ada Date: Tue, 09 Feb 2010 15:44:17 +0100 Message-ID: <7tdap6F251U1@mid.individual.net> References: <38a0a3f9-b4a0-48f3-98c9-63b03fe03aca@q4g2000yqm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: individual.net /9uSBfKGvo/rSVoaQ7G/5Q6WF8KNgOweB0mv1Lpz/CWTNSc8s= Cancel-Lock: sha1:uRpwNvaU3lDcYmG38QeAiMmJcLs= User-Agent: KNode/4.4 rc2 Xref: g2news1.google.com comp.lang.ada:9036 Date: 2010-02-09T15:44:17+01:00 List-Id: Maciej Sobczak wrote: > On 5 Lut, 22:53, Hibou57 (Yannick DuchĂȘne) > 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