comp.lang.ada
 help / color / mirror / Atom feed
From: markp <markwork66@yahoo.com>
Subject: Quick Protected Object question
Date: Mon, 8 Dec 2008 05:34:36 -0800 (PST)
Date: 2008-12-08T05:34:36-08:00	[thread overview]
Message-ID: <7d83cfa9-a97c-4a74-8202-c15035d607fa@j39g2000yqn.googlegroups.com> (raw)

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?

Thank you.



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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 13:34 markp [this message]
2008-12-08 13:43 ` Quick Protected Object question Ludovic Brenta
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