comp.lang.ada
 help / color / mirror / Atom feed
From: "Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr>
Subject: Re: Private or public task ?
Date: Fri, 5 Feb 2010 18:20:58 -0800 (PST)
Date: 2010-02-05T18:20:58-08:00	[thread overview]
Message-ID: <809d051b-5f55-4e7c-b21e-94c0a508e161@k19g2000yqc.googlegroups.com> (raw)
In-Reply-To: 1rvjt99u2jqa8.1okqcvf62hlc8$.dlg@40tude.net

On 5 fév, 22:38, "Jeffrey R. Carter" <spam.jrcarter....@spam.acm.org>
wrote:
> Technically this is a bounded error: Ada.Text_IO.Put* operations are potentially
> blocking, and should not be called from a protected operation.

On 5 fév, 22:40, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> This is illegal, because protected procedure shall not perform potentially
> 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)] :
“ During a protected action, it is a bounded error to invoke an
operation that is potentially blocking. ” (follows a list of
operations defined to be potentially blocking)
And later in [ARM 9.5.1(17)] :
“ 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. ”

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.



  parent reply	other threads:[~2010-02-06  2:20 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
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) [this message]
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