Skip to content

Commit

Permalink
Use Task.Run instead of Task.Factory.StartNew (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach authored and dennisdoomen committed Nov 29, 2017
1 parent 9c2baf3 commit 47238f9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Src/LiquidProjections.PollingEventStore/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void Start()
CancellationToken = cancellationTokenSource.Token
};

Task = Task.Factory.StartNew(async () =>
Task = Task.Run(async () =>
{
try
{
Expand All @@ -72,10 +72,7 @@ public void Start()
exception);
}
},
CancellationToken.None,
TaskCreationOptions.DenyChildAttach | TaskCreationOptions.LongRunning,
TaskScheduler.Default)
.Unwrap();
CancellationToken.None);
}
}

Expand Down

0 comments on commit 47238f9

Please sign in to comment.