comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@mitre-bedford.arpa  (Robert I. Eachus)
Subject: Re: Question on tasking...
Date: 10 Aug 93 23:00:45 GMT	[thread overview]
Message-ID: <EACHUS.93Aug10180045@spectre.mitre.org> (raw)

In article <1993Aug10.144611.23993@evb.com> jjh@evb.com (John Halper) writes:

   > I have a question in the following program,
   >    procedure Main is
   >	   task type Task_Type;
   >	   type Task_Ptr is access Task_Type;
   > 	   Task_Instance : Task_Type;
   > begin
   >    block:
   > 	 begin
   > 	    Task_Instance := new Task_Type;
   > 	    Task_Instance := null;
   > 	 end;  -->  Does block wait until Task_Instance Terminates ????
   > end Main;

     No, Main does.

     And now for the language lawyering...actually Main will not be
left until the task instance created in the block* is completed or
waiting at a terminate alternative.  For tasks created by allocators,
the master is the block containing the access type declaration, or in
the case of library packages, the master is the environment task,
which allows the main program to exit before all library tasks have
completed.  (See RM 9.4, especially paragraph 2 and the note in
paragraph 13.)

* And any dependant tasks, you didn't show us the task body...

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...

             reply	other threads:[~1993-08-10 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-10 23:00 Robert I. Eachus [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-18 23:38 Question on tasking cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!howland.
1993-08-10 17:56 vnet.IBM.COM
1993-08-10 14:46 John Halper
replies disabled

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