Skip to content

Commit

Permalink
add comments for dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
ZjzMisaka committed Nov 11, 2023
1 parent 3442cae commit d1066da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions PowerThreadPool/PowerThreadPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,12 +1282,19 @@ internal void OnWorkStart(string workID)
}
}

/// <summary>
/// Will try stop, force stop and kill all of the workers.
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

/// <summary>
/// Dispose the instance
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (!disposed)
Expand Down
2 changes: 1 addition & 1 deletion UnitTest/StressTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public async Task StressTest1()
}
}

//[Fact]
[Fact]
public async void StressTest2()
{
PowerPool powerPool = new PowerPool(new PowerPoolOption() { });
Expand Down

0 comments on commit d1066da

Please sign in to comment.