deadlock_detection=flag;
if(deadlock_detection != flag) { deadlock_detection=flag; if(started) { if(deadlock_detection) { startScheduler(); } else { stopScheduler(); } } }
    public void setDeadlockDetection(boolean flag) {        deadlock_detection=flag;    }