Symbols API: full thread-safety
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
There're some APIs using which from multiple threads at the same time may lead to a dead lock or to an infinite looping.
I've seen this in several places and when attaching a debugger to a hanging process, it was hanging inside ``Dictionary`2``. (part of parallels stack screenshot is attached below).
I've seen it in `FSharpEntity.BaseType`, `FSharpMemberOrFunctionOrValue.XmlDocSig` and now in `FSharpChecker.GetProjectOptionsFromScript(...)`. Adding locks around uses of the first two APIs fixes the the issue for me. If needed I can remove the locks to reproduce it and provide stack traces.
Can we replace uses of `Dictionary` with `ConcurrentDictionary` in places that may be (indirectly) called by FCS clients?

Contributor guide
Assessment
This issue has not been assessed yet.