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: 103376,4bd6ca8f7a1eb225 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.56.163 with SMTP id b3mr8771187pbq.0.1322838479878; Fri, 02 Dec 2011 07:07:59 -0800 (PST) Path: lh20ni58956pbb.0!nntp.google.com!news2.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Class with task destructor Date: Fri, 02 Dec 2011 10:07:59 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <30604696.94.1322013045135.JavaMail.geo-discussion-forums@yqzz20> <24938373.1788.1322615481874.JavaMail.geo-discussion-forums@yqjo5> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1322838479 20970 192.74.137.71 (2 Dec 2011 15:07:59 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 2 Dec 2011 15:07:59 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:b3Ivv7HcMG9MlJu29P44QrQ+kZI= Xref: news2.google.com comp.lang.ada:14792 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 2011-12-02T10:07:59-05:00 List-Id: "J-P. Rosen" writes: > Le 01/12/2011 22:48, Robert A Duff a �crit : >> "J-P. Rosen" writes: >> >>> Put an entry (say "Termination_Wait") in the waited task, and never >>> accept it. Call Termination_Wait from the waiting task. When the waiting >>> task receives Tasking_Error, the waited task is terminated (well, >>> completed, but that should be close enough). > For the special case of the OP (freeing the task's space), you are > right, but this trick is quite useful in the general case. Yes, it is useful to know that the task is completed. >...Even in the > OP case, you can add a busy loop once the task is completed; this one is > likely to be executed at most once (on an uni-processor, there is less > concern about busy loops on multi-processors). True. But it's frustrating that the "delay" is likely to be both too short, and too long, if you know what I mean. - Bob