프로그래밍/JAVA

크리티컬섹션 처리

GANADARA 2018. 7. 19. 21:31
public int increase() {
synchronized(this) {
return ++count;
}
}

public synchronized int increase() {
return ++count;
}