public void setResult ( T obj ) { lock . lock ( ) ; try { result = obj ; hasResult = true ; cond . signal ( true ) ; } finally { lock . unlock ( ) ; } }
Sets the result and notifies any threads waiting for it