if (busyflag == Thread.currentThread()) { busyflag = null; }
while (tryGetBusyFlag() == false) { try { Thread.sleep(100); } catch (Exception e) {} }
if (busyflag == null) { busyflag = Thread.currentThread(); return true; } return false;