FileDocCategorySizeDatePackage
BusyFlag2.javaAPI DocExample1844Thu Feb 04 16:10:36 GMT 1999None

BusyFlag2

public class BusyFlag2 extends Object

Fields Summary
protected Thread
busyflag
Constructors Summary
Methods Summary
public synchronized voidfreeBusyFlag()

		  if (busyflag == Thread.currentThread()) {
			   busyflag = null;
		  }
	 
public voidgetBusyFlag()

	    
		  while (tryGetBusyFlag() == false) {
			   try {
					Thread.sleep(100);
			   } catch (Exception e) {}
		  }
	 
public synchronized booleantryGetBusyFlag()

		  if (busyflag == null) {
			   busyflag = Thread.currentThread();
			   return true;
		  }
		  return false;