Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
else if(number == 3) {
  Thread.sleep(2000);	   		    			   
  list.notifyAll();      	   		  
} 	    	  

Exceptions

EX1: If there are several similar threads waiting for a notification, and it is permissible to invoke either of them, notify() may be used. There should be a relaxed liveness criteria.

Risk Assessment

To guarantee the liveness of a system, the method notifyAll() should be called rather than notify().

...