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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC 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!lll-crg!ames!ucbcad!ucbvax!LLL-ICDC.ARPA!pearson%bud.DECnet From: pearson%bud.DECnet@LLL-ICDC.ARPA ("BUD::PEARSON") Newsgroups: comp.lang.ada Subject: Question about stopping tasks. Message-ID: <8612180651.AA28995@ucbvax.Berkeley.EDU> Date: Wed, 17-Dec-86 17:39:00 EST Article-I.D.: ucbvax.8612180651.AA28995 Posted: Wed Dec 17 17:39:00 1986 Date-Received: Thu, 18-Dec-86 20:44:35 EST Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "BUD::PEARSON" Organization: The ARPA Internet List-Id: I have a task whose only job is to accept data from an external device and add them to a queue. It spends essentially all of its time in an I/O wait state, which is what I wanted, since data may be missed if it gets distracted too long. (When it adds something to the queue, it calls an entry in another task to announce that there's something to process; but the other task is designed so that it is essentially always ready to accept that entry call.) The problem: How do I tell this task to stop when the program decides to end? Presently, I'm making a direct call to the "Pull the plug on this program" system service (Starlet.Exi on this VAX / VMS system), but I understand that this constitutes an Erroneous Program, since I'm doing it while an I/O operation is outstanding. Another option I've considered, having an AST transfer control to one arm of a SELECT that also has a TERMINATE, is also illegal because of the outstanding I/O. Surely people do this sort of thing all the time. What's the ticket? - Peter pearson%anchor.decnet@lll-icdc.arpa ------