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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,73bdb823e1c1f689 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: idiom for task termination? Date: 1997/02/10 Message-ID: #1/1 X-Deja-AN: 217966947 references: <32FA10EF.32A@bix.com> <32FF32D7.67D2@elca-matrix.ch> content-type: text/plain; charset=ISO-8859-1 organization: Estormza Software mime-version: 1.0 newsgroups: comp.lang.ada Date: 1997-02-10T00:00:00+00:00 List-Id: In article <32FF32D7.67D2@elca-matrix.ch>, Mats.Weber@elca-matrix.ch wrote: >The user of P will then delcare an object of type P.ADT, which will make >him the master of the task object, and the terminate alternative in the >body of ADT will be selected when the program terminates. 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. You are correct that a terminate alternative would do the trick, but only if the server task doesn't have to do anything before terminating. That's why I asked if the abstraction required to be told to quit. Asking, How do I quit if my client forgets to tell me to quit?, is a little like asking, What happens if I use Unchecked_Conversion to return a value outside the range of the target type? Of course, the behaviour is undefined, so don't do it. matt -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271