Skip to main content
Package: com.phoenix_int.util Class Hierarchy

Declaration
Class to simplify wait and notify calls. Can be used to block one thread until some other thread signals a continue. Sample usage:

Field Summary

Constructor Summary

Method Summary

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

rcsid

See Also:

Constructor Detail

PHXBlocker

Method Detail

setBlock

Call setBlock() before block() and before there is any remote chance that any other thread will call unblock().

getBlock

block

Blocks until unblock is invoked or timeout has been reached Parameters:
  • timeout - Maximum time to wait in milliseconds. Set to 0 to wait forever.
Returns:
  • true if correctly unblocked. false if interrupted or timeout.

block

Blocks until unblock() is invoked.

unblock

unblockAll

Same as unblock except designed for multiple waiters. If there is any chance of multiple people having called block(), then use unblockAll().