Synchronizing JDWP startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a simple, if naive, question about synchronizing JDWP startup. 
When a VM starts JDWP, two new threads are created to handle 
communications to the debugger. The VM must wait for these threads to be 
completely initialized and running before continuing (which would almost 
certainly include sending a VM_INIT event).

The question is: how do people think is the best way to do this?

Right now, I've got JdwpConnection and PacketProcessor essentially 
setting an "I'm ready" flag in gnu.classpath.jdwp.Jdwp. Libgcj then 
spins on a method call to Jdwp.isInitialized, sleeping for some short 
time if the return value is false.

This works for gcj, but I'm uncertain of what other VMs would prefer.

Does anyone have an opinion one way or the other about how this is done 
right now? [Aka, should we worry about it when it becomes a problem?]

Keith


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux