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: bobduff@world.std.com (Robert A Duff) Subject: Re: idiom for task termination? Date: 1997/02/18 Message-ID: #1/1 X-Deja-AN: 219648251 References: <32FA10EF.32A@bix.com> <32FB6A6A.431E@elca-matrix.ch> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-02-18T00:00:00+00:00 List-Id: In article <32FB6A6A.431E@elca-matrix.ch>, Mats Weber wrote: >Robert A Duff wrote: >> >> In article <32FA10EF.32A@bix.com>, Tom Moran wrote: >> >What's a good idiom for terminating tasks inside library packages? >> >If I build a re-usable package which contains an internal task which >> >has an 'entry quit' but does not have a select-terminate alternative, >> >> Why not add a terminate alternative? That's what it's for... > >Because tasks whose masters are library units other than the main >program are not required to terminate, and the terminate alternative >needs not be chosen. This was not true in Ada 83, and is not true in Ada 95. The RM83 was not clear on this point, but AI-399 "clarifies" it. And (I hope) RM95 is clear on this point. In Ada 95, a task object declared immediately within a library package depends directly on the environment task (not the package), and the normal rules apply to terminate alternatives in this case (that is, if all the tasks are waiting at terminate alts, then the env task and all its dependents terminate). - Bob