Skip to content

Commit

Permalink
remove namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
colombod committed Feb 23, 2021
1 parent 2c470e9 commit 314e740
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Microsoft.DotNet.Interactive/KernelScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;

Expand Down Expand Up @@ -32,7 +31,7 @@ public Task<U> Schedule(T value, OnExecuteDelegate onExecuteAsync, string scope
{
_cancellationTokenSource.Token.Register(() =>
{
if(!operation.CompletionSource.Task.IsCompleted)
if (!operation.CompletionSource.Task.IsCompleted)
{
operation.CompletionSource.SetCanceled();
}
Expand All @@ -43,7 +42,7 @@ public Task<U> Schedule(T value, OnExecuteDelegate onExecuteAsync, string scope
{
var previousSynchronizationContext = SynchronizationContext.Current;
var synchronizationContext = new ClockwiseSynchronizationContext();

SynchronizationContext.SetSynchronizationContext(synchronizationContext);
Task.Run(async () =>
{
Expand Down Expand Up @@ -150,7 +149,7 @@ public void Cancel()
_scheduledOperations = new List<ScheduledOperation>();
_deferredOperationRegistrations = new List<DeferredOperation>();

_cancellationTokenSource.Cancel();
_cancellationTokenSource.Cancel();
_cancellationTokenSource = new CancellationTokenSource();
}
}
Expand Down

0 comments on commit 314e740

Please sign in to comment.