Skip to content

Commit

Permalink
Use an immutable copy of DefaultDispatcher to avoid synchronization
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 686957973
  • Loading branch information
jcking authored and copybara-github committed Oct 17, 2024
1 parent ea78c86 commit 261cd7b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ public CelRuntimeLegacyImpl build() {
}

return new CelRuntimeLegacyImpl(
new DefaultInterpreter(runtimeTypeProvider, dispatcher, options), options, this);
new DefaultInterpreter(runtimeTypeProvider, dispatcher.immutableCopy(), options),
options,
this);
}

private static CelDescriptorPool newDescriptorPool(
Expand Down

0 comments on commit 261cd7b

Please sign in to comment.