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,7897733b1978b6a4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.39.100 with SMTP id o4mr122461pbk.0.1321545715802; Thu, 17 Nov 2011 08:01:55 -0800 (PST) Path: h5ni1892pba.0!nntp.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Freezing a task Date: Thu, 17 Nov 2011 16:00:17 +0000 Organization: A noiseless patient Spider Message-ID: References: <32992849.648.1321544004241.JavaMail.geo-discussion-forums@vbmh5> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="9427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+52vN2BNryUEE8e6hJt+QHPYwiJtRATMs=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:gd8JmwkC74g1UBMrZ5QRmAkr008= sha1:y0+es9bkTanf/jhHqcot671EdxU= Xref: news2.google.com comp.lang.ada:14435 Content-Type: text/plain; charset=us-ascii Date: 2011-11-17T16:00:17+00:00 List-Id: "Rego, P." writes: > Is there a more elegant way to do this? Maybe some procedure > My_Task.FreezeNow in a unknown (by me) package? Thanks Well, you could do it in the debugger :-) Programmatically, no. Your choices for inter-task comms are (a) the rendezvous, (b) polling some shared resource (eg a protected object), (c) something using sockets. Or you could unilaterally abort the task, which would be the end of it. For (a), maybe something like loop select accept Pause; accept Continue; else null; end select; -- do stuff end loop;