comp.lang.ada
 help / color / mirror / Atom feed
From: arny@wayback.UUCP (Arny B. Engelson)
Subject: Task dependence and termination
Date: Thu, 30-Oct-86 17:27:13 EST	[thread overview]
Date: Thu Oct 30 17:27:13 1986
Message-ID: <993@wayback.UUCP> (raw)


   Would anyone care to comment on the following situation?:

   I have a Semaphore task which uses a looping select statement with a
Terminate alternative.  This task is declared in a library package.
I use the Semaphore in two different records (Rec1, Rec2) which are
declared in another library package.  An access pointer to Rec2 (Rec2p)
is also declared in this package.  The main program creates objects of
type Rec1 and Rec2p.  If I am reading LRM 9.4 correctly, none of the
Semaphores will ever self-terminate (paragraphs 7-8 and 2).  Moving the
Rec2p declaration to the main program should cause those Semaphores to
terminate but not the Rec1 Semaphores.  Am I right so far?
   Next step.  Will creating a Die entry in the Semaphore that causes it
to exit the loop actually get it to terminate, or will it hang at the
end statement?  It should Die, but this is a clumsy way of doing things.

   Any intelligent comments are welcome.  Please don't suggest moving the
Semaphore declaration to the main program.

THE CHALLENGE:
   Actually this came about because of a problem trying to terminate a
task that very stubbornly refuses to die.  The task is declared in the
main program.  A pointer to it is declared within a package in the main
program.  The main program is "begin null; end;".  When all other tasks
in the program are terminated ('terminated = True), this one hangs at its
end statement.  If anyone particularly knowledgeable about tasking would
like to take a crack at it, I'd be glad to describe it (and possibly
furnish a reduced version).


Arny B. Engelson
{ ihnp4 | bonnie | clyde } wayback!arny
(201) 386-4816

             reply	other threads:[~1986-10-30 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-10-30 22:27 Arny B. Engelson [this message]
1986-11-06 15:18 ` Task dependence and termination stt
replies disabled

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