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,bd6afd90718a4783 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!news.tiscali.de!news.belwue.de!news.uni-stuttgart.de!not-for-mail From: Stefan Bellon Newsgroups: comp.lang.ada Subject: Re: GNAT and large number of threads Date: Fri, 27 Apr 2007 07:46:42 +0200 Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: <20070427074642.1bfe3525@cube.tz.axivion.com> References: <1177631815.809213.197820@t38g2000prd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: infosun2.rus.uni-stuttgart.de 1177652763 3371 129.69.226.21 (27 Apr 2007 05:46:03 GMT) X-Complaints-To: news@news.uni-stuttgart.de NNTP-Posting-Date: Fri, 27 Apr 2007 05:46:03 +0000 (UTC) X-Newsreader: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; i486-pc-linux-gnu) X-URL: http://www.axillion.de/ Xref: g2news1.google.com comp.lang.ada:15343 Date: 2007-04-27T07:46:42+02:00 List-Id: Gene wrote: > On Apr 26, 6:50 pm, Wiktor Moskwa wrote: > > I'm using GNAT GPL 2006 on Linux x86. > > Recently I had a problem with creating large number of tasks(*) in > > my Ada program. I create tasks in a loop and when I reach the limit > > of stack address space the main thread freezes - no exceptions, > > nothing. I made the same observation with GNAT Pro 6.0.1 on x86 GNU/Linux. See posting <20070418201307.18a85fd9@cube.tz.axivion.com> where I still thought it's just an effect of context switching eating up all the time. Later on I noticed that from a certain number of tasks on, nothing happens anymore at all. > If you need to exploit an MP environment, then use a task pool of N > tasks for N processors. Is there a way of finding out the number of available processors in Ada (or GNAT) that works at least on GNU/Linux, Windows, and Solaris? -- Stefan Bellon