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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a5ba2421fbe2fea3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!lightspeed.eweka.nl!feeder.news-service.com!post.news-service.com!news1.surfino.com!not-for-mail Message-Id: <2190069.I2Igd2yRta@linux1.krischik.com> From: Martin Krischik Subject: Re: task synchronization and returns in accept Newsgroups: comp.lang.ada Reply-To: martin@krischik.com Date: Tue, 08 Feb 2005 16:56:44 +0100 References: <5f59677c.0502080736.64ead69f@posting.google.com> Organization: None User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@surfino.com NNTP-Posting-Host: 83.169.148.166 (83.169.148.166) NNTP-Posting-Date: Tue, 08 Feb 2005 17:00:08 +0100 X-Trace: abbc94208e208f60c310301888 Xref: g2news1.google.com comp.lang.ada:8191 Date: 2005-02-08T16:56:44+01:00 List-Id: Evangelista Sami wrote: > Hello all > > Let's take this piece of code: > ----------------------------------------- > procedure Test is > task type T1; > task body T1 is > begin > null; > end; > task type T2 is > entry E; > end T2; > task body T2 is > begin > accept E do > declare > T : T1; > begin > return; > end; > end E; > end; > My_T2 : T2; > begin > My_T2.E; > end; > ----------------------------------------- > > what does exactly happen at the "return" statement in the accept. > does it wait for the termination of task T? Yes, T2 need to wait for the end of T1 - just as Test need to wait for the end of T2. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com