code: synchronized void waitEndOfRead()
  	{
  		long	t0 = System.currentTimeMillis();
  		long	dt = 0;
  		while (isActive() && dt<3000)
  		{
  			long	t1 = System.currentTimeMillis();
  			dt = t1-t0;
  			//System.out.println(dt + ": "+name + " is already active !!!");
  			try { Thread.sleep(10); } catch(InterruptedException e){}
  		}
  
  		setActive(true);
  		set_value_flag(false);
  	}
docs: ===============================================================