Skip to content

Commit 2b457e1

Browse files
committed
add a comment
1 parent 10c330a commit 2b457e1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sdk/src/main/java/software/amazon/lambda/durable/operation/ConcurrencyOperation.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ private BaseDurableOperation waitForChildCompletion(Set<BaseDurableOperation> ru
232232
}
233233
registerActiveThread(threadContext.threadId());
234234
});
235+
// <- there is a race condition if the future is completed at this point
236+
// The registerActiveThread would have been called before deregisterActiveThread
235237
if (!futureCompletedImmediately.get()) {
236238
// Deregister the current thread to allow suspension
237239
executionManager.deregisterActiveThread(threadContext.threadId());

0 commit comments

Comments
 (0)