Skip to content

Commit

Permalink
refactor: Simplified TaskWorker.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Oct 11, 2023
1 parent 43a13ca commit 9213b00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libs/H.Pipes/Utilities/TaskWorker.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#nullable enable

namespace H.Pipes.Utilities;
namespace H.Pipes.Utilities;

/// <summary>
/// A class designed to run code using <see cref="Task"/> with <see cref="TaskCreationOptions.LongRunning"/> <br/>
Expand All @@ -25,7 +23,7 @@ internal sealed class TaskWorker : IAsyncDisposable
/// <summary>
/// Internal task CancellationTokenSource
/// </summary>
public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource();
public CancellationTokenSource CancellationTokenSource { get; } = new();

#endregion

Expand Down

0 comments on commit 9213b00

Please sign in to comment.