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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,70248dce89939ca0,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-28 04:49:00 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!uunet.MISMATCH!ash.uu.net!news2.netvision.net.il!not-for-mail From: meh Newsgroups: comp.lang.ada Subject: parallel computing of prime numbers Date: Sun, 28 Dec 2003 15:31:27 +0200 Organization: NetVision InterNetNews site Message-ID: NNTP-Posting-Host: dsl212-235-84-214.bb.netvision.net.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news2.netvision.net.il 1072615188 5767 212.235.84.214 (28 Dec 2003 12:39:48 GMT) X-Complaints-To: usenet@netvision.net.il NNTP-Posting-Date: Sun, 28 Dec 2003 12:39:48 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:3882 Date: 2003-12-28T15:31:27+02:00 List-Id: I'd like to compute parallely primes with variable amount of tasks. I made a task with an entry to compute a single number's primeness and then looped through all tasks and assigned each task a new number to work on. My problem is that the assigning command waits until the prime calculation ends, I want it to assign the task a number to work on and then CONTINUE IMMEDIATELY assigning other numbers to other tasks. I thought of making an array of semaphore and input variables, and then to use them to assign numbers to tasks (I'll intialize each task with the relevant semaphore), but it seems very clumsy way to do things. Pray, how can I do that in a more elegant way?