Results 1 to 2 of 2
  1. #1
    Neha Sharma is offline Member
    Join Date
    May 2013
    Posts
    1
    Rep Power
    0

    Default Netbeans hangs while exit after completing executing for multiple thread

    I have multiple thread in my class that implements runnable class. The runnable class is basically responsible to update status(Open/Completed) of a child order. For each child orders I am maintaining a Thread.

    In the run() method, i have a while loop which terminates loop for all threads upon certain condition (achieved through volatile variable & condition is if the child order is completed) and hence all thread gets terminated after exit from while and completes run().

    Now i have another class(say Main class) that invokes this run() method of my runnable class for all child orders. My main class keep on checking status for each child order (checking status of all child order inside a loop of main class). Upon receiving status as completed for any of child order, I am terminating loop of main class and updating the test case as passed in database.

    While executing the above scenario, in case if i have more then two threads, my IDE and entire system hangs and even task manager is not working in such cases.As a result, I have to explicitly re-start my system. But the test case gets executed successfully at the back-end and database is also updated accordingly. I don't know why multiple threads are causing problem to IDE?

    Please suggest what should be done.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: Netbeans hangs while exit after completing executing for multiple thread

    I don't know why multiple threads are causing problem to IDE?
    What makes you think it is an issue with your IDE? Have you run the code independent of it?

    Post an SSCCE, without which we can only guess, mine being that you are spawning several threads which are working 100%, in essence overloading your system CPU's

Similar Threads

  1. NetBeans hangs on startup
    By peterme in forum NetBeans
    Replies: 1
    Last Post: 01-25-2010, 10:22 PM
  2. [SOLVED] Multiple client single server problem(it hangs halfway)
    By kellaw in forum Threads and Synchronization
    Replies: 4
    Last Post: 10-03-2008, 07:41 PM
  3. Replies: 1
    Last Post: 10-02-2008, 07:03 PM
  4. Replies: 1
    Last Post: 10-02-2008, 07:02 PM
  5. Replies: 1
    Last Post: 10-02-2008, 07:01 PM

Tags for this Thread

Posting Permissions

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