Skip to content

Commit

Permalink
-Work.succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
ZjzMisaka committed Mar 12, 2024
1 parent 305f9ef commit 368dfd8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions PowerThreadPool/Work.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ internal class Work<TResult> : WorkBase
private Func<object[], TResult> function;
private object[] param;
private WorkOption<TResult> workOption;
private bool succeed = true;
private CallbackEndEventHandler callbackEndHandler;

internal override int WorkPriority { get => workOption.WorkPriority; }
Expand All @@ -58,7 +57,6 @@ public Work(PowerPool powerPool, string id, Func<object[], TResult> function, ob
if (powerPool.failedWorkSet.Contains(dependedId))
{
powerPool.CallbackEnd -= callbackEndHandler;
this.succeed = false;
Interlocked.Decrement(ref powerPool.waitingWorkCount);
powerPool.CheckPoolIdle();
return;
Expand Down Expand Up @@ -86,7 +84,6 @@ public Work(PowerPool powerPool, string id, Func<object[], TResult> function, ob
if (powerPool.failedWorkSet.Contains(dependedId))
{
powerPool.CallbackEnd -= callbackEndHandler;
this.succeed = false;
Interlocked.Decrement(ref powerPool.waitingWorkCount);
powerPool.CheckPoolIdle();
return;
Expand Down

0 comments on commit 368dfd8

Please sign in to comment.