Is this use of ConcurrentDictionary truly thread safe?
If you just used your original code (TryGetValue followed by an indexer set) with ConcurrentDictionary, then that wouldn't be thread-safe.

But you're using the AddOrUpdate method instead, which is guaranteed to be thread-safe (i.e. atomic), so this use is thread-safe.



One other nitpick:

Directory.EnumerateFiles(dirPath, wildCard)
|&gt; Array.ofSeq


If you don't actually want seq, but an array, Directory has a method just for that: Directory.GetFiles.