comp.lang.ada
 help / color / mirror / Atom feed
* Quick Protected Object question
@ 2008-12-08 13:34 markp
  2008-12-08 13:43 ` Ludovic Brenta
  0 siblings, 1 reply; 3+ messages in thread
From: markp @ 2008-12-08 13:34 UTC (permalink / 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-09 19:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 13:34 Quick Protected Object question markp
2008-12-08 13:43 ` Ludovic Brenta
2008-12-09 19:59   ` micronian2

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