그냥 HashSet을 쓰고 다중 스레드가 접근하게하면 동시성 이슈가 발생하지만, Collections.synchronizedSet(new HashSet<>()); 을 쓰면 스레드 세이프하게 사용 가능하다.