diff --git a/src/fsharp/import.fs b/src/fsharp/import.fs index dab3e6eec93..6db631a0318 100644 --- a/src/fsharp/import.fs +++ b/src/fsharp/import.fs @@ -4,6 +4,7 @@ module internal Microsoft.FSharp.Compiler.Import open System.Reflection +open System.Collections.Concurrent open System.Collections.Generic open Microsoft.FSharp.Compiler.AbstractIL.IL @@ -52,7 +53,7 @@ type AssemblyLoader = /// serves as an interface through to the tables stored in the primary TcImports structures defined in CompileOps.fs. [] type ImportMap(g:TcGlobals,assemblyLoader:AssemblyLoader) = - let typeRefToTyconRefCache = new System.Collections.Generic.Dictionary() + let typeRefToTyconRefCache = ConcurrentDictionary() member this.g = g member this.assemblyLoader = assemblyLoader member this.ILTypeRefToTyconRefCache = typeRefToTyconRefCache