aspose file tools*
The moose likes Threads and Synchronization and the fly likes How can i Initilise PrimeRacers before anyworker Thread is Started? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "How can i Initilise PrimeRacers before anyworker Thread is Started?" Watch "How can i Initilise PrimeRacers before anyworker Thread is Started?" New topic
Author

How can i Initilise PrimeRacers before anyworker Thread is Started?

barnie stinson
Greenhorn

Joined: Oct 10, 2012
Posts: 1
Hi All,

i would like to know how can i initialise all the primeRacers before any worker thread is started. In the following code:


Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1666
    
    7

I think the easiest way would be to have all the threads rendezvous at a CountDownLatch.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can i Initilise PrimeRacers before anyworker Thread is Started?
 
Similar Threads
Issue with executor thread pool
Access HashMap by multiple threads concurrently
InterruptedException
Threads and DB Access
Sieve of Eratosthenes