comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen & Tammy House <house@ro.com>
Subject: Re: How to wait for task completion
Date: 1996/09/20
Date: 1996-09-20T00:00:00+00:00	[thread overview]
Message-ID: <32433FD4.202D@ro.com> (raw)
In-Reply-To: 01bba2fb$2aed33e0$3c8371a5@dhoossr.iquest.com


David C. Hoos, Sr. wrote:
> 
> wiljan <W.Derks@nl.cis.philips.com> wrote in article
> <01bba2e8$c45aad90$35208b82@wd>...
> > At a certain point I want to clean up the resources that the task is
> > using but this can only be done when the task is completed.
> 
> If the task can't clean up its own resources, why not provide a subprogram
> it can call just before it terminates?
> --
> David C. Hoos, Sr.,
> http://www.dbhwww.com
> http://www.ada95.com
Interesting, I just happen to have written this very thing this week.  A
task type is written such that its last act is to take itself out of a
global list of tasks.  It also frees the list node which held the
pointer to itself and frees itself (as the task is an object) with an
instance of Unchecked Deallocation.

Any guess as to whether the task terminates normally or disappears in a
flurry of segmentation faults as the object is returned to the heap?  It
doesn't seem to matter much, it goes away and the RTS doesn't complain
(or hasn't yet).  <Verdix compiler, SGI box, Ada83>




  reply	other threads:[~1996-09-20  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-15  0:00 How to wait for task completion wiljan
1996-09-15  0:00 ` David C. Hoos, Sr.
1996-09-20  0:00   ` Stephen & Tammy House [this message]
1996-09-15  0:00 ` Samuel Tardieu
1996-09-16  0:00   ` wiljan
1996-09-17  0:00     ` Ted Dennison
1996-09-17  0:00     ` Samuel Tardieu
1996-09-17  0:00       ` wiljan
1996-09-17  0:00       ` Norman H. Cohen
1996-09-17  0:00         ` wiljan
1996-09-18  0:00           ` Tucker Taft
1996-09-18  0:00             ` Norman H. Cohen
1996-09-18  0:00   ` Jon S Anthony
1996-09-16  0:00 ` Jon S Anthony
replies disabled

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