From: "Martin Dowie" <martin.dowie@nospam.baesystems.com>
Subject: Re: How do I end the program?
Date: Wed, 6 Feb 2002 08:40:47 -0000
Date: 2002-02-06T08:40:47+00:00 [thread overview]
Message-ID: <3c60eba6$1@pull.gecm.com> (raw)
In-Reply-To: dstanbro-27CD07.18440906022002@mec2.bigpond.net.au
> > 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.
This was covered circa nov/dec 2000 and the above solution was
proposed with the slight twist of "env_task_id" being a package
level variable assigned during elaboration. The rationale then
was that all elaboration occurs within the scope of the environment
task.
Can't remember who put forward the example - I have a feeling they
had a french sounding name though! :-)
next prev parent reply other threads:[~2002-02-06 8:40 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
2002-02-06 8:40 ` Martin Dowie [this message]
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