Skip to content

Commit

Permalink
fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jul 26, 2024
1 parent 2828cbc commit 1950e78
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ abstract class MappingResolver<T : MappingResolver<T>>(val name: String) {
open suspend fun resolve(): MemoryMappingTree {
if (::resolved.isInitialized) return resolved
return resolveLock.withLock {
if (::resolved.isInitialized) return resolved
finalize()
val values = _entries.values
val resolvedEntries = mutableSetOf<MappingEntry>()
Expand Down

0 comments on commit 1950e78

Please sign in to comment.