IR: use synchronized access when creating initial signature stub
This commit is contained in:
committed by
teamcityserver
parent
cb7a59ea0e
commit
570e20696c
+2
-1
@@ -21,7 +21,8 @@ interface IrLazyFunctionBase : IrLazyDeclarationBase, IrTypeParametersContainer
|
||||
val initialSignatureFunction: IrFunction?
|
||||
|
||||
fun createInitialSignatureFunction(): Lazy<IrFunction?> =
|
||||
lazy(LazyThreadSafetyMode.PUBLICATION) {
|
||||
// Need SYNCHRONIZED; otherwise two stubs generated in parallel may fight for the same symbol.
|
||||
lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
descriptor.initialSignatureDescriptor?.takeIf { it != descriptor }?.original?.let(stubGenerator::generateFunctionStub)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user