comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Quick Protected Object question
Date: Mon, 8 Dec 2008 05:43:37 -0800 (PST)
Date: 2008-12-08T05:43:37-08:00	[thread overview]
Message-ID: <b16380cc-7f76-4827-bb4d-544863c5555e@w1g2000prk.googlegroups.com> (raw)
In-Reply-To: 7d83cfa9-a97c-4a74-8202-c15035d607fa@j39g2000yqn.googlegroups.com

On Dec 8, 2:34 pm, markp <markwor...@yahoo.com> wrote:
> I have a very quick protected object question. In a standard proected
> object setup as follows:
>
> protected Test is
>    procedure A;
>    procedure B;
> private
>    Z : integer := 0;
> end Test;
>
> protected body Test is
>    procedure A is
>    begin
>       < set of statements>
>    end A;
>
>    procedure B is
>    begin
>       < set of statements>
>    end B;
> end Test;
>
> The question is this: when procedure A is called, are all threads that
> try to call B suspended until A finishes or, do the threads that call
> B execute as long as A is not touching the private data "Z". Is the
> lock at the procedure level or only at the data level?

At the procedure level; see ARM 9.5.1 at http://www.adaic.com/standards/05rm/html/RM-9-5-1.html

--
Ludovic Brenta.



  reply	other threads:[~2008-12-08 13:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 13:34 Quick Protected Object question markp
2008-12-08 13:43 ` Ludovic Brenta [this message]
2008-12-09 19:59   ` micronian2
replies disabled

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