comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Eachus <rieachus@comcast.net>
Subject: Re: How to tell whether program finalization can be suppressed
Date: Sun, 3 Dec 2017 09:16:45 -0800 (PST)
Date: 2017-12-03T09:16:45-08:00	[thread overview]
Message-ID: <3dcad98b-d517-4c3a-a77b-dd584c143b2c@googlegroups.com> (raw)
In-Reply-To: <ca4c9516-0781-4d72-97c4-b52004a502bb@googlegroups.com>

On Saturday, December 2, 2017 at 6:12:13 AM UTC-5, AdaMagica wrote:
> 
> Just to refresh my memory:
> The main subprogram is the master of any library tasks. It may be empty (I just confirmed this with a little test) and thus does not exit until all library tasks are terminated or waiting on a terminate alternative.
> 
> with Lib;  -- in the elaboration sequence, there are some tasks
> procedure Main is
> begin
>   null;  -- waiting here for tasks to terminate
> end Main;

No, the environment task is the master of library level tasks.  It doesn't matter in your test case since the waiting will occur after the main program completes.  If the desire is not to wait after the main program finishes, end it with an abort statement.  Nicer means of program shutdown when the main program completes are left as an exercise for the reader.

  reply	other threads:[~2017-12-03 17:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 21:39 How to tell whether program finalization can be suppressed Simon Wright
2017-12-01 22:43 ` Randy Brukardt
2017-12-02  9:48   ` Simon Wright
2017-12-04 20:18     ` Randy Brukardt
2017-12-04 22:41     ` Simon Wright
2017-12-02 11:12   ` AdaMagica
2017-12-03 17:16     ` Robert Eachus [this message]
2017-12-04 11:58       ` AdaMagica
2017-12-04 14:36         ` Robert Eachus
2017-12-04 17:16           ` AdaMagica
2017-12-04 18:21             ` Jeffrey R. Carter
2017-12-04 20:25             ` Randy Brukardt
2017-12-04 20:22         ` Randy Brukardt
2017-12-02  3:08 ` Robert Eachus
2017-12-27 15:49 ` Simon Wright
replies disabled

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