[FEATURE] Thread-Safe реализация WaitEventHandler

This commit is contained in:
Gravit 2019-05-22 05:41:58 +07:00
parent 65aec60ef5
commit aab9a27f73

View file

@ -5,10 +5,12 @@
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
public class WaitEventHandler implements ClientWebSocketService.EventHandler { public class WaitEventHandler implements ClientWebSocketService.EventHandler {
public HashSet<ResultEvent> requests = new HashSet<>(); public Set<ResultEvent> requests = ConcurrentHashMap.newKeySet();
@Override @Override
public void process(ResultInterface result) { public void process(ResultInterface result) {