Skip to content

Commit b45a4ea

Browse files
Merge branch 'modelThreading' of https://github.com/CyrusNajmabadi/roslyn into modelThreading
2 parents b8eec1c + 6039901 commit b45a4ea

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/EditorFeatures/Core.Wpf/SignatureHelp/Controller.Session_ComputeModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ private async Task<Model> ComputeModelInBackgroundAsync(
5353
{
5454
using (Logger.LogBlock(FunctionId.SignatureHelp_ModelComputation_ComputeModelInBackground, cancellationToken))
5555
{
56+
this.Computation.ThreadingContext.ThrowIfNotOnBackgroundThread();
5657
cancellationToken.ThrowIfCancellationRequested();
5758

5859
var document = Controller.DocumentProvider.GetDocument(caretPosition.Snapshot, cancellationToken);

src/EditorFeatures/Core.Wpf/SignatureHelp/Controller.Session_SetModelSelectedItem.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ private void SetModelExplicitlySelectedItem(Func<Model, SignatureHelpItem> selec
2828
Model? model,
2929
Func<Model, SignatureHelpItem> selector)
3030
{
31+
this.Computation.ThreadingContext.ThrowIfNotOnBackgroundThread();
3132
if (model == null)
3233
return null;
3334

0 commit comments

Comments
 (0)