Skip to content

Commit

Permalink
Merge pull request #8617 from drewnoakes/lang-svc-small-bits
Browse files Browse the repository at this point in the history
Add dataflow block name and some API docs
  • Loading branch information
drewnoakes authored Oct 19, 2022
2 parents 279a7f1 + 893e60c commit 9b99b42
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ protected override async Task InitializeCoreAsync(CancellationToken cancellation
target: DataflowBlockFactory.CreateActionBlock<IProjectVersionedValue<(ConfiguredProject ActiveConfiguredProject, ConfigurationSubscriptionSources Sources)>>(
update => OnSlicesChanged(update, cancellationToken),
_unconfiguredProject,
ProjectFaultSeverity.LimitedFunctionality),
ProjectFaultSeverity.LimitedFunctionality,
"LanguageServiceHostSlices {0}"),
linkOptions: DataflowOption.PropagateCompletion,
cancellationToken: cancellationToken),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,34 @@ protected override Task DisposeCoreUnderLockAsync(bool initialized)
return Task.CompletedTask;
}

/// <summary>
/// Adds an object that will be disposed along with this <see cref="Workspace"/> instance.
/// </summary>
/// <param name="disposable">The object to dispose when this object is disposed.</param>
public void ChainDisposal(IDisposable disposable)
{
Verify.NotDisposed(this);

_disposableBag.Add(disposable);
}

/// <summary>
/// Integrates project updates into the workspace.
/// </summary>
/// <remarks>
/// <para>
/// This method must always receive an evaluation update first. After that point,
/// both evaluation and build updates may arrive in any order, so long as values
/// of each type are ordered correctly.
/// </para>
/// <para>
/// Calls must not overlap. This method is not thread-safe. This method is designed
/// to be called from a dataflow ActionBlock, which will serialize calls, so we
/// needn't perform any locking or protection here.
/// </para>
/// </remarks>
/// <param name="update">The project update to integrate.</param>
/// <returns>A task that completes when the update has been integrated.</returns>
internal async Task OnWorkspaceUpdateAsync(IProjectVersionedValue<WorkspaceUpdate> update)
{
Verify.NotDisposed(this);
Expand Down

0 comments on commit 9b99b42

Please sign in to comment.