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: 103376,eed7a24b26e16574,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!j39g2000yqn.googlegroups.com!not-for-mail From: markp Newsgroups: comp.lang.ada Subject: Quick Protected Object question Date: Mon, 8 Dec 2008 05:34:36 -0800 (PST) Organization: http://groups.google.com Message-ID: <7d83cfa9-a97c-4a74-8202-c15035d607fa@j39g2000yqn.googlegroups.com> NNTP-Posting-Host: 157.127.124.15 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1228743277 5690 127.0.0.1 (8 Dec 2008 13:34:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 8 Dec 2008 13:34:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j39g2000yqn.googlegroups.com; posting-host=157.127.124.15; posting-account=jTWBqwoAAABUn9jGA4xSu9A8sRwazGmt User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:3906 Date: 2008-12-08T05:34:36-08:00 List-Id: 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.