Code example for Condition

Methods: signalAll

0
	 
	public int add( SoftData op )
	{ 
		lock.lock() ;
		data.offer( op );
		wait.signalAll() ;
		lock.unlock() ;
		return 0 ; 
	} 
	public SoftData get() { 
//		eventq.size(); 
		System.out.println("]]]]]]]]]]]]]]]");
		SoftData op = null ;
		lock.lock();
		try{ 
			System.out.println("[[[[[[[[[[");
			if( data.size() < 1 )
				wait.await() ;
			op = data.poll() ;
		} 
		catch ( InterruptedException ex )