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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,edda2b296e2577cf X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!news.glorb.com!news2.glorb.com!news.mv.net!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: GNAT's Protected Objects Date: Tue, 09 Nov 2010 09:21:24 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4af1a5f4-7bf3-47ee-af67-db50e589e7a8@n32g2000pre.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls6.std.com 1289312484 30692 192.74.137.71 (9 Nov 2010 14:21:24 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 9 Nov 2010 14:21:24 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:inji33OFEOOzYaPeQ05yNjzgXuc= Xref: g2news2.google.com comp.lang.ada:16376 Date: 2010-11-09T09:21:24-05:00 List-Id: Jeffrey Carter writes: > On 11/08/2010 03:43 PM, Robert A Duff wrote: >> >> By the way, I don't see the point of the Create_Tasks block. >> Seems like it's not needed. > > I guess not, since the function won't return until the tasks > complete. It's a general construct I use to wait for a group of tasks to > complete before doing something else. No, as Egil H�vik pointed out, I was wrong, because the return expression will be evaluated before awaiting dependent tasks. Your code was right in the first place! He also made a good suggestion about cache (false sharing). - Bob