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,9828c94314b4e79a X-Google-Attributes: gid103376,public From: elaine.waybright@pcisys.net Subject: Re: Task question... Date: 1997/10/19 Message-ID: <344a5b0e.102700339@news.pcisys.net>#1/1 X-Deja-AN: 281819346 References: <344580FA.478A@eelab.su.oz.au> Organization: PCI Systems Inc. Newsgroups: comp.lang.ada Date: 1997-10-19T00:00:00+00:00 List-Id: On Thu, 16 Oct 1997 12:50:34 +1000, Paul Van Gorp wrote: >Hi, I have this strange problem when using tasking in Ada95 > >compiler: GNAT 3.10p1 >OS: micro$oft w95. > >Im looking for a way to accomplish the following (im sure there exists a >simple soln!) > >task type t1 is > entry reply; > ... >end t1; > >task type t2 is > ... >end t2; > >task body t1 is > T: t2; >begin > loop > select > accept reply; > T.do_something; > ... > or > ... > T.do_something_else; > ... > end select; > end loop; >end t1; > >task body t2 is >begin > loop > select > ... > -- what I want here, is to invoke t1.reply > -- from within different instances of T1 > -- if you know what I mean > end select; > end loop; >end t2; > >so, if I went something like... > >taska, taskb: t1; > >each taska and taskb would have its own instance of T, which they >could rendezvous with easily enough with T.whatever, but how could that >task T rendezvous with the task that called it ? > >Thanks in advance.. > >Paul > > ... Perhaps you can turn things around and let t1 call an entry in t2 rather than t2 calling the reply entry of t1? What exactly is the purpose of this? It sounds potentially over-complicated. Bo Sanden Prof. Bo Sanden Colorado Technical University 4435 N. Chestnut Street Colorado Springs, CO 80907-3896 Email: bsanden@acm.org Http://www.isse.gmu.edu/faculty/bsanden