public abstract static class RVMThread.SoftHandshakeVisitor extends Object
During a soft handshake, the requesting thread waits for all mutator threads (i.e. non-gc threads) to perform a requested action.
Constructor and Description |
---|
SoftHandshakeVisitor() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
checkAndSignal(RVMThread t)
Sets whatever flags need to be set to signal that the given thread should
perform some action when it acknowledges the soft handshake.
|
boolean |
includeThread(RVMThread t)
Checks whether to include the specified thread in the soft handshake.
|
void |
notifyStuckInNative(RVMThread t)
Called when it is determined that the thread is stuck in native.
|
public SoftHandshakeVisitor()
public abstract boolean checkAndSignal(RVMThread t)
This method is only called for threads for which includeThread(RVMThread)
is true
.
This method is called with the thread's monitor held, but while the thread may still be running. This method is not called on mutators that have indicated that they are about to terminate.
t
- the thread that will be processedfalse
if not interested in this thread, true
otherwise.
Returning true
will cause a soft handshake request to be put through.public void notifyStuckInNative(RVMThread t)
This implementation does nothing.
t
- the thread that's stuck in nativepublic boolean includeThread(RVMThread t)
This method will never see any threads from the garbage collector because those are excluded from the soft handshake by design.
This implementation always returns true
.
t
- The thread to check for inclusiontrue
if the thread should be included.