Skip to content

Commit

Permalink
Merge pull request #1815 from lf-lang/thread-safe-uniquename
Browse files Browse the repository at this point in the history
Make `uniqueName` thread-safe
  • Loading branch information
petervdonovan authored Jun 3, 2023
2 parents 59f944d + 183e705 commit a06d23b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public InferredType resolveType(InferredType t) {
* Return a name that is unique to this TypeParameterizedReactor (up to structural equality) and
* that is prefixed with exactly one underscore and that does not contain any upper-case letters.
*/
public String uniqueName() {
public synchronized String uniqueName() {
String name = reactor.getName().toLowerCase();
if (uniqueNames.containsKey(this)) return uniqueNames.get(this);
if (nameCounts.containsKey(name)) {
Expand Down

0 comments on commit a06d23b

Please sign in to comment.