public void setResult ( T result ) { lock . lock ( ) ; try { if ( Objects . equals ( expected_result , result ) ) super . setResult ( result ) ; } finally { lock . unlock ( ) ; } }
Sets the result only if expected_result matches result