question: public boolean waitUntilEmpty ( long timeout ) throws InterruptedException { if ( ! notifyLock . tryLock ( timeout , TimeUnit . MILLISECONDS ) ) { return false ; } try { return pending . isEmpty ( ) || notifyCondition . await ( timeout , TimeUnit . MILLISECONDS ) ; } finally { notifyLock . unlock ( ) ; } }
target:  Wait until the client's pending queue is empty. May not work if there are people concurrently adding to the queue 