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,6516065ab7b5a533 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!g11g2000yqe.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: Q: Stopping a task running a long simulation Date: Thu, 11 Mar 2010 18:03:38 -0800 (PST) Organization: http://groups.google.com Message-ID: <1f3de7cf-9bc0-481c-8019-ce053b5fdfe3@g11g2000yqe.googlegroups.com> References: NNTP-Posting-Host: 81.62.183.49 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1268359418 2201 127.0.0.1 (12 Mar 2010 02:03:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 12 Mar 2010 02:03:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g11g2000yqe.googlegroups.com; posting-host=81.62.183.49; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Chrome/5.0.321.0 Safari/533.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9537 Date: 2010-03-11T18:03:38-08:00 List-Id: > However, I'd be surprised by the behavior if you abort the task but > Compute keeps using CPU for any length of time. Yes, that would be a bit counter-intuitive (since the call to Compute is part of the task). What happens is that the abort is in the main window's Destroy method, which occurs after its closing, so I guess it is just waiting at the abort statement. And if I understand well, a delay 0.0 in the main Compute loop would facilitate the aborting (I'll experiment it). Anyway, in the end I'll use the more deterministic way discussed elsewhere. Thanks Gautier