comp.lang.ada
 help / color / mirror / Atom feed
From: Tom Moran <tmoran@bix.com>
Subject: Re: idiom for task termination?
Date: 1997/02/11
Date: 1997-02-11T00:00:00+00:00	[thread overview]
Message-ID: <3300275D.5D94@bix.com> (raw)
In-Reply-To: mheaney-ya023680001002972039190001@news.ni.net


> But the question is, Does the select even have a terminate alternative?  If
> you need to do some work before you terminate - such as shut down a device
> or close a file - then you have to be told explicity to shut down.
  I think if that was the problem then the 'last wishes' example in 
Burns & Wellings - declare a controlled type inside the task body and
have its Finalize do the last wishes of the departing task - would work.
But here I'm trying to execute a terminate alternative when the rules of
Ada won't let me put in a terminate alternative.  And more to the point,
I want to gracefully catch a possible user error - failing to tell me to
quit - with as little burden on the user as possible.  (If the user
didn't make mistakes, even during debugging, then he would have called
my Quit routine.)  If the user just does a 'with' of my package, and
then the first statement of his program causes an unhandled exception, I
really don't want to simply hang and force him to use the OS to abort
the task and lose any exception information that might be present and
useful.  Various techniques come fairly close, but so far I've seen none
that actually provide this.




      reply	other threads:[~1997-02-11  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <32FA10EF.32A@bix.com>
1997-02-07  0:00 ` idiom for task termination? Robert A Duff
1997-02-07  0:00   ` Mats Weber
1997-02-18  0:00     ` Robert A Duff
1997-02-07  0:00   ` Tom Moran
1997-02-08  0:00 ` Matthew Heaney
1997-02-09  0:00   ` Tom Moran
1997-02-10  0:00     ` Matthew Heaney
1997-02-10  0:00   ` Mats Weber
1997-02-10  0:00     ` Matthew Heaney
1997-02-11  0:00       ` Tom Moran [this message]
replies disabled

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