package thead.safe.safe7;

import lombok.Getter;

@Getter
public class Counter {
    private final Object lock1 = new Object();
    private final Object lock2 = new Object();
    private int count1 = 0;
    private int count2 = 0;

    public void incrementCount1() {
        synchronized (lock1) {
            count1++;
        }
    }

    public void incrementCount2() {
        synchronized (lock2) {
            count2++;
        }
    }

}
