안드로이드 wait() / notifyAll() 사용 예제.

 

public synchronized void waitStatus() {
    try {
        wait();
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}

public synchronized void notifyStatus() {
    notifyAll();
}

반응형

+ Recent posts