public final Collection < Thread > getWaitingThreads ( ConditionObject condition ) { if ( ! owns ( condition ) ) throw new IllegalArgumentException ( "Not owner" ) ; return condition . getWaitingThreads ( ) ; }
Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer . Because the actual set of threads may change dynamically while constructing this result the returned collection is only a best - effort estimate . The elements of the returned collection are in no particular order .