Results 1 to 3 of 3
  1. #1
    gaurav2211 is offline Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    0

    Default 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

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    Without seeing some code we'd be guessing.

  3. #3
    gaurav2211 is offline Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    0

    Default

    I am extremely sorry. The problem was something else which was causing this to happen. I could find it after 6 hours of debugging. Thank you very much for your time.

Similar Threads

  1. GUI and Threads
    By rp181 in forum Threads and Synchronization
    Replies: 1
    Last Post: 10-10-2009, 08:39 PM
  2. crawler doesn't start threads.
    By Pierced1 in forum Threads and Synchronization
    Replies: 2
    Last Post: 09-28-2009, 08:02 PM
  3. Replies: 5
    Last Post: 03-20-2009, 10:04 PM
  4. Threads!
    By rameshraj in forum Advanced Java
    Replies: 1
    Last Post: 05-04-2008, 04:11 PM
  5. Using threads
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-11-2007, 10:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •