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,6b353437b73507a5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Jano Newsgroups: comp.lang.ada Subject: Re: Basic program with tasks goes out of memory Date: Fri, 06 Aug 2004 13:23:01 +0200 Message-ID: <2nh7vfFq355U1@uni-berlin.de> References: <5ad0dd8a.0408050655.355fa926@posting.google.com> <2nf4m2F7cpkU1@uni-berlin.de> <2ngv8lFnp34U1@uni-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de PTfHNj14tEDwtfxxeDEfnQLIGoj8znTt2ksNnBm7FNH5W1nLA= User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:2605 Date: 2004-08-06T13:23:01+02:00 List-Id: Jean-Pierre Rosen wrote: > If (like me) you don't like busy waiting, you can do the following: > begin > Dummy.Never_Accepted; > exception > when Tasking_Error => > null; > end; > Of course, the entry Never_Accepted is never accepted, but the > run-time will raise Tasking_Error in waiting tasks when Dummy > completes. (Strictly speaking, if you are on a multi-processor or if > the waiting task is of higher priority than Dummy, you should still > have a loop to wait for the task to terminate, but in this case the > busy loop would be presumably executed only once). Nice trick.