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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13c68a067434682 X-Google-Attributes: gid103376,public From: Larry Coon Subject: Re: Task question Date: 1997/10/13 Message-ID: <34425F8E.3104@assist.org>#1/1 X-Deja-AN: 280182688 References: <3439D647.7C43@home.com> Organization: University of California Reply-To: larry@assist.org Newsgroups: comp.lang.ada Date: 1997-10-13T00:00:00+00:00 List-Id: Robert A Duff wrote: [your reply rearranged slightly] > If you willing to have the extra entry, then do this: > accept done; > exit; > So the exit statement comes *after* the accept statement, not inside > it. Yes, I figured it out myself using a flag, but switched to this solution when others suggested it.... > When a terminate alternative is selected, the task will finalize all its > local variables before actually becoming terminated. So you can put the > "other stuff" in a Finalize procedure, and have it executed that way. > If the "other stuff" needs access to local data inside the task, you can > put that data inside the Limited_Controlled object, or you can get at it > via an access discriminant. ...but since this is a learning experience for me (I've never worked with tasks before), I'll be sure to check out these suggestions -- thanks. Larry Coon University of California larry@assist.org <= Note new address and lmcoon@home.com