File tree Expand file tree Collapse file tree
sdk/src/main/java/software/amazon/lambda/durable/execution Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import java .time .Instant ;
66import java .util .ArrayList ;
77import java .util .Collections ;
8- import java .util .HashMap ;
98import java .util .HashSet ;
109import java .util .List ;
1110import java .util .Map ;
1211import java .util .Objects ;
1312import java .util .Set ;
1413import java .util .concurrent .CancellationException ;
1514import java .util .concurrent .CompletableFuture ;
15+ import java .util .concurrent .ConcurrentHashMap ;
1616import java .util .concurrent .ThreadPoolExecutor ;
1717import java .util .concurrent .atomic .AtomicReference ;
1818import java .util .stream .Collectors ;
@@ -59,7 +59,7 @@ public class ExecutionManager implements AutoCloseable {
5959 private final DurableConfig durableConfig ;
6060
6161 // ===== Thread Coordination =====
62- private final Map <String , BaseDurableOperation > registeredOperations = Collections . synchronizedMap ( new HashMap <>() );
62+ private final Map <String , BaseDurableOperation > registeredOperations = new ConcurrentHashMap <>();
6363 private final Set <String > activeThreads = Collections .synchronizedSet (new HashSet <>());
6464 private static final ThreadLocal <ThreadContext > currentThreadContext = new ThreadLocal <>();
6565 private final CompletableFuture <Void > executionExceptionFuture = new CompletableFuture <>();
You can’t perform that action at this time.
0 commit comments