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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4ba141e02a508f3e,start X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: abort task on WinNT Date: 2000/09/13 Message-ID: #1/1 X-Deja-AN: 669282278 Sender: bobduff@world.std.com (Robert A Duff) References: <39BF6B74.786B4219@icn.siemens.de> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-09-13T00:00:00+00:00 List-Id: Alfred Hilscher writes: > The problem I have is, the program must terminate immediately when the > user request termination. But due to the task running in a loop, it > doesn't (it waits for the task termination I think). I tried to insert > an "abort t;" at the end of "p", but it still doesn't terminate. You should look at RM-9.8(15-19) and D.6(2). You should find out whether your compiler supports Annex D. You can kill the whole program by aborting the environment task. To get the ID of the env task, declare a constant in a library package (or in the main procedure) initialized to Current_Task. See C.7.1. Are you sure you want to stop the program "immediately"? What if it's in the middle of doing something important? - Bob