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,FREEMAIL_FROM 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,CP1252 Path: g2news1.google.com!postnews.google.com!k19g2000yqc.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Private or public task ? Date: Fri, 5 Feb 2010 18:20:58 -0800 (PST) Organization: http://groups.google.com Message-ID: <809d051b-5f55-4e7c-b21e-94c0a508e161@k19g2000yqc.googlegroups.com> References: <1rvjt99u2jqa8.1okqcvf62hlc8$.dlg@40tude.net> NNTP-Posting-Host: 86.75.149.60 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265422858 6551 127.0.0.1 (6 Feb 2010 02:20:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 6 Feb 2010 02:20:58 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k19g2000yqc.googlegroups.com; posting-host=86.75.149.60; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8930 Date: 2010-02-05T18:20:58-08:00 List-Id: On 5 f=E9v, 22:38, "Jeffrey R. Carter" wrote: > Technically this is a bounded error: Ada.Text_IO.Put* operations are pote= ntially > blocking, and should not be called from a protected operation. On 5 f=E9v, 22:40, "Dmitry A. Kazakov" wrote: > This is illegal, because protected procedure shall not perform potentiall= y > blocking actions (like I/O. Here is the reference (for any other peoples who read this thread) : First occurrence of this requirement appears as an example in [ARM 9.5(4.e)] : procedure Op2 is begin Op1; -- An internal call. Pt.Op1; -- Another internal call. PO.Op1; -- An external call. It the current instance is PO, then -- this is a bounded error (see 9.5.1). Other_Object.Some_Op; -- An external call. end Op2; Then formally stated at [ARM 9.5.1(8)] : =93 During a protected action, it is a bounded error to invoke an operation that is potentially blocking. =94 (follows a list of operations defined to be potentially blocking) And later in [ARM 9.5.1(17)] : =93 If the bounded error is detected, Program_Error is raised. If not detected, the bounded error might result in deadlock or a (nested) protected action on the same target object. =94 So it is not guaranteed to be a bounded error, as nested protected action may succeed. By as soon as it is said it is a potential error, ... all is said.