Skip to content

Commit b00d343

Browse files
committed
Add comment on LoadedProjectSet
1 parent a972838 commit b00d343

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectLoader.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ internal abstract class LanguageServerProjectLoader
4343
private readonly BinlogNamer _binlogNamer;
4444
protected readonly ImmutableDictionary<string, string> AdditionalProperties;
4545

46+
/// <summary>
47+
/// Stores LoadedProjects representing all the TFMs of a single project (whose file path is the key in <see cref="_loadedProjects"/>)
48+
/// </summary>
49+
/// <param name="Semaphore">
50+
/// Synchronizes access to and disposal of items in <see cref="LoadedProjects"/>.
51+
/// This must be obtained prior to any actions on LoadedProjects.
52+
/// </param>
53+
/// <param name="CancellationTokenSource">
54+
/// When cancelled, signals that some thread has started disposing the <see cref="LoadedProjects"/>.
55+
/// This must be checked after acquiring <see cref="Semaphore"/>, prior to performing any actions on LoadedProjects.
56+
/// </param>
4657
protected record LoadedProjectSet(List<LoadedProject> LoadedProjects, SemaphoreSlim Semaphore, CancellationTokenSource CancellationTokenSource);
4758

4859
private readonly ConcurrentDictionary<string, LoadedProjectSet> _loadedProjects = [];

0 commit comments

Comments
 (0)