All Implemented Interfaces:
ObjectReference
All Known Implementing Classes:
ThreadReferenceImpl, ThreadReferenceImpl
Robert
- FieldGordon
- HirschJames
- McIlree1.3
- Field Summary | ||
---|---|---|
public final int | THREAD_STATUS_UNKNOWN | Thread status is unknown |
public final int | THREAD_STATUS_ZOMBIE | Thread has completed execution |
public final int | THREAD_STATUS_RUNNING | Thread is runnable |
public final int | THREAD_STATUS_SLEEPING | Thread is sleeping - Thread.sleep() or JVM_Sleep() was called |
public final int | THREAD_STATUS_MONITOR | Thread is waiting on a java monitor |
public final int | THREAD_STATUS_WAIT | Thread is waiting - Object.wait() or JVM_MonitorWait() was called |
public final int | THREAD_STATUS_NOT_STARTED | Thread has not yet been started |
Method from com.sun.jdi.ThreadReference Summary: |
---|
currentContendedMonitor, forceEarlyReturn, frame, frameCount, frames, frames, interrupt, isAtBreakpoint, isSuspended, name, ownedMonitors, ownedMonitorsAndFrames, popFrames, resume, status, stop, suspend, suspendCount, threadGroup |
Method from com.sun.jdi.ThreadReference Detail: |
---|
Not all target virtual machines support this operation. Use VirtualMachine#canGetCurrentContendedMonitor() to determine if the operation is supported. |
The method which will return early is referred to as the called method. The called method is the current method (as defined by the Frames section in the Java Virtual Machine Specification) for the specified thread at the time this method is called. The thread must be suspended. The return occurs when execution of Java programming language code is resumed on this thread. Between the call to this method and resumption of thread execution, the state of the stack is undefined. No further instructions are executed in the called method. Specifically, finally blocks are not executed. Note: this can cause inconsistent states in the application. A lock acquired by calling the called method (if it is a synchronized method) and locks acquired by entering synchronized blocks within the called method are released. Note: this does not apply to native locks or java.util.concurrent.locks locks. Events, such as MethodExit, are generated as they would be in a normal return. The called method must be a non-native Java programming language method. Forcing return on a thread with only one frame on the stack causes the thread to exit when resumed.
The Not all target virtual machines support this operation. Use VirtualMachine#canForceEarlyReturn() to determine if the operation is supported. |
|
|
|
|
|
|
|
|
Not all target virtual machines support this operation. Use VirtualMachine#canGetOwnedMonitorInfo() to determine if the operation is supported. |
Not all target virtual machines support this operation. Use VirtualMachine#canGetMonitorFrameInfo() to determine if the operation is supported. |
All frames up to and including the
After this operation, this thread will be
suspended at the invoke instruction of the target method
that created
The operand stack is restored, however, any changes
to the arguments that occurred in the called method, remain.
For example, if the method void foo(int x) { System.out.println("Foo: " + x); x = 4; System.out.println("pop here"); }was called with foo(7) and foo
is popped at the second println and resumed,
it will print: Foo: 4 .
Locks acquired by a popped frame are released when it is popped. This applies to synchronized methods that are popped, and to any synchronized blocks within them. Finally blocks are not executed. No aspect of state, other than this thread's execution point and locks, is affected by this call. Specifically, the values of fields are unchanged, as are external resources such as I/O streams. Additionally, the target program might be placed in a state that is impossible with normal program flow; for example, order of lock acquisition might be perturbed. Thus the target program may proceed differently than the user would expect. The specified thread must be suspended.
All No events are generated by this method. None of the frames through and including the frame for the caller of frame may be native. Not all target virtual machines support this operation. Use VirtualMachine.canPopFrames() to determine if the operation is supported. |
|
|
|
Unlike java.lang.Thread#suspend , suspends of both the virtual machine and individual threads are counted. Before a thread will run again, it must be resumed (through #resume or ThreadReference#resume ) the same number of times it has been suspended. Suspending single threads with this method has the same dangers as java.lang.Thread#suspend() . If the suspended thread holds a monitor needed by another running thread, deadlock is possible in the target VM (at least until the suspended thread is resumed again). The suspended thread is guaranteed to remain suspended until resumed through one of the JDI resume methods mentioned above; the application in the target VM cannot resume the suspended thread through java.lang.Thread#resume . |
|
|