From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!wayback!arny From: arny@wayback.UUCP (Arny B. Engelson) Newsgroups: net.lang.ada Subject: Task dependence and termination Message-ID: <993@wayback.UUCP> Date: Thu, 30-Oct-86 17:27:13 EST Article-I.D.: wayback.993 Posted: Thu Oct 30 17:27:13 1986 Date-Received: Fri, 31-Oct-86 13:49:36 EST Organization: AT&T Bell Labs, Whippany, NJ Keywords: Interesting situation & questions, and a challenge List-Id: 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