Skip to content

Commit

Permalink
fix(codegen): fixed problem with concurrent modification
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Feb 23, 2022
1 parent 09415e0 commit f352cbf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ private String getExprString(MSpecParser.ExpressionContext ctx) {
}

public void dispatchType(String typeName, TypeDefinition type) {
types.put(typeName, type);
LOGGER.debug("dispatching {}:{}", typeName, type);
List<Consumer<TypeDefinition>> waitingConsumers = typeDefinitionConsumers.getOrDefault(typeName, new LinkedList<>());
LOGGER.debug("{} waiting for {}", waitingConsumers.size(), typeName);
Expand All @@ -770,7 +771,6 @@ public void dispatchType(String typeName, TypeDefinition type) {
consumerIterator.remove();
}
typeDefinitionConsumers.remove(typeName);
types.put(typeName, type);
}

@Override
Expand Down

0 comments on commit f352cbf

Please sign in to comment.