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 Date: Sun, 03 Dec 2006 09:34:59 +0100 From: Gautier User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Weird problem with recursion and tasks References: <1165116074.751484.99560@j44g2000cwa.googlegroups.com> In-Reply-To: <1165116074.751484.99560@j44g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 85.0.103.145 X-Original-NNTP-Posting-Host: 85.0.103.145 Message-ID: <45728c18$1_5@news.bluewin.ch> X-Trace: news.bluewin.ch 1165134872 85.0.103.145 (3 Dec 2006 09:34:32 +0100) Organization: Bluewin AG Complaints-To: abuse@bluewin.ch X-Original-NNTP-Posting-Host: 127.0.0.1 Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!164.128.36.58!news.ip-plus.net!newsfeed.ip-plus.net!news.bluewin.ch!not-for-mail Xref: g2news2.google.com comp.lang.ada:7792 Date: 2006-12-03T09:34:59+01:00 List-Id: christopher.orihuela@gmail.com: > I was implementing a concurrent version of QuickSort (each half in a > different task) when I realized that sometimes the recursive task > didn't execute. > �Could anybody tell me why for values of MaxI > 4 I allways get a > higer count of A in the following program? Thanks. The behaviour seems to depend on the compiler... - With ObjectAda 7.2.2 SE I always get, in debug or release mode: A: 62 B: 62 - With GNAT GPL 2006 I usually get the same, but also sometimes A: 62 B: 57 or even down to A: 60 B: 49 Here my competencies stop, I'm not a specialist in tasks & Co. Then, is it your compiler or something missing in the code - I cannot decide... HTH ______________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/index.htm Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!