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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d0c649cbc04d397b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news.glorb.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!14bb18d8!not-for-mail Sender: Matthew Heaney@MHEANEYIBMT43 Newsgroups: comp.lang.ada Subject: Re: Weird problem with recursion and tasks References: <1165116074.751484.99560@j44g2000cwa.googlegroups.com> From: Matthew Heaney Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 03 Dec 2006 13:56:46 GMT NNTP-Posting-Host: 24.149.57.125 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1165154206 24.149.57.125 (Sun, 03 Dec 2006 05:56:46 PST) NNTP-Posting-Date: Sun, 03 Dec 2006 05:56:46 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news2.google.com comp.lang.ada:7794 Date: 2006-12-03T13:56:46+00:00 List-Id: "christopher.orihuela@gmail.com" writes: > protected body Counter is > Procedure ShowCounts is > begin > Put_Line("A: " & Integer'Image(A)); > Put_Line("B: " & Integer'Image(B)); > end ShowCounts; > end Counter; Ada.Text_IO.Put_Line is a "potentially-blocking operation" so you should not call it from a protected operation; be aware that Program_Error might get raised here. (Ada 2005 has a new feature whereby you can request the compiler to detect that a potentially-blocking call was made and raise that exception.)