Monday, July 30, 2001 09:23 AM
The public final boolean isAlive() method returns true if the
thread has been started but the run() method has not yet exited.
The public boolean isInterrupted() method returns true if the
thread is in a waiting state.
With JVMDI :
Get Thread Status
GetThreadStatus(jthread thread, jint *threadStatusPtr, jint *suspendStatusPtr)
Get status information for a thread.
the thread to query
on return, points to the current status of the thread. The thread status is one of the following values.
Thread has completed execution.
Thread is runnable.
Thread sleeping. (Thread.sleep() has been called.)
Thread is waiting to enter a synchronization block.
Thread waiting. (Object.wait() has been called.)
on return, points to information on suspension. The suspend status is a combination of one or more of the following bit flags.
Thread suspended. (java.lang.Thread.suspend() or or SuspendThread has been called.) If this bit is set, the status returned via statusPtr refers to the thread status before suspension.
Thread has hit a breakpoint. This bit is only set if the thread is the current thread or the thread is suspended.
This function returns either a universal error or one of the following errors:
thread was invalid.