Skip to content

Commit 6b96083

Browse files
committed
add missing lock around disposeTypeProviderActions
1 parent da009fb commit 6b96083

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Compiler/Driver/CompilerImports.fs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,8 +1586,10 @@ and [<Sealed>] TcImports
15861586

15871587
#if !NO_TYPEPROVIDERS
15881588
member private tcImports.AttachDisposeTypeProviderAction action =
1589-
CheckDisposed()
1590-
disposeTypeProviderActions.Add action
1589+
tciLock.AcquireLock(fun tcitok ->
1590+
CheckDisposed()
1591+
RequireTcImportsLock(tcitok, disposeTypeProviderActions)
1592+
disposeTypeProviderActions.Add action)
15911593
#endif
15921594

15931595
// Note: the returned binary reader is associated with the tcImports, i.e. when the tcImports are closed

0 commit comments

Comments
 (0)