2 Replies Latest reply: Jun 10, 2008 10:35 AM by 843810 RSS

    Disrubtive Behaviour with threads


      I am currently using JDI to debug a specified class by launching a virtual machine , acquiring the event queue for the virtual machine mirror and then iterating through the event sets and handling each event.

      If the class i am currently processing is multi threaded i want to be able to execute the thread statments in a parallel manner. But since i am handling events sequentially i dont think that this could be done.

      How can i solve this problem ?


      Ahmed Ashmawy
        • 1. Re: Disrubtive Behaviour with threads
          Can you give an example of what you mean by 'execute the thread statements in a parallel manner'?

          Threads in the debuggee run asynchronously, and can even run at the same time on a multicore CPU. When you request events from JDI, you specify if you want no threads, all threads or just the event thread to be suspended. Maybe you want to just suspend the event thread so the other threads will keep running while you process the event. Or maybe you don't want to suspend any thread .
          • 2. Re: Disrubtive Behaviour with threads
            Thanx man , i had the suspend policy to suspend all , Now its working fine :D