Results 1 to 3 of 3
- 12-18-2009, 03:29 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 5
- Rep Power
- 0
Threads don't start after few iterations
I have developed a simulation in which I have used multi-threading. There are 150 threads that run at a time. I have to run the simulation 1000 times .Therefore I put the entire code in a for loop. The simulation run fine for few iterations and after that the threads don't start. While the command prompt still shows that the program is running. The task manager shows that its no longer using the excess portion of CPU it was using in previous iterations.
I thought it would be a problem with Garbage collector so tried running r.gc(); but it does not help.
I also thought that the threads in previous iteration would not have stopped. Therefore I checked weather the thread is still alive or not before proceeding for the next iteration.Last edited by gaurav2211; 12-18-2009 at 03:32 AM. Reason: No reason
- 12-18-2009, 09:29 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Without seeing some code we'd be guessing.
- 12-18-2009, 09:34 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
GUI and Threads
By rp181 in forum Threads and SynchronizationReplies: 1Last Post: 10-10-2009, 08:39 PM -
crawler doesn't start threads.
By Pierced1 in forum Threads and SynchronizationReplies: 2Last Post: 09-28-2009, 08:02 PM -
How do you start a Java program from the "Start" menu under Windows?
By ScottVal in forum New To JavaReplies: 5Last Post: 03-20-2009, 10:04 PM -
Threads!
By rameshraj in forum Advanced JavaReplies: 1Last Post: 05-04-2008, 04:11 PM -
Using threads
By Java Tip in forum Java TipReplies: 0Last Post: 12-11-2007, 10:25 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks