comp.lang.ada
 help / color / mirror / Atom feed
From: Dale Stanbrough <dstanbro@bigpond.net.au>
Subject: Re: How do I end the program?
Date: Wed, 06 Feb 2002 07:46:33 GMT
Date: 2002-02-06T07:46:33+00:00	[thread overview]
Message-ID: <dstanbro-27CD07.18440906022002@mec2.bigpond.net.au> (raw)
In-Reply-To: Ie188.29041$S06.95354@rwcrnsc53

Steve Doiel wrote:

> In the main procedure of your program, before entering glutMainLoop save off
> the task ID of the environment task.
> 
>   env_task_id := Ada.Task_Identification.Current_Task;
> 
> When you want to kill the program call:
> 
>   Ada.Task_Identification.Abort_Task( env_task_id );
> 
> When you kill the environment task, all subordinate tasks are terminated as
> well.
> 
> With GNAT 3.14p, I get the message:
>   Execution terminated by abort of environment task
> 
> On the console window of my test program.

Well, i'm not sure that would work. What if one of the tasks is 
a library level task, i.e. declared and elaborated in a library
level package? I'm not sure that there is a "parent" task in that
case.


Dale



  reply	other threads:[~2002-02-06  7:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-04 23:15 How do I end the program? David Starner
2002-02-05  3:52 ` dale
2002-02-05  6:17   ` Simon Wright
2002-02-05  7:39   ` Dmitriy Anisimkov
2002-02-05 12:35 ` David C. Hoos
2002-02-05 13:26 ` Stephen Leake
2002-02-06  3:16 ` Steve Doiel
2002-02-06  7:46   ` Dale Stanbrough [this message]
2002-02-06  8:40     ` Martin Dowie
2002-02-06 17:55     ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox