RecyclableList.IndexOf performance improvements.
This commit is contained in:
1 parent
c4e633e7d3
commit
29cb16793a
3 files changed
+152
-152
No files matched your search
@@ -22,14 +22,14 @@ namespace Recyclable.Collections.Parallel
|
||||
context._isItemFound = false;
|
||||
}
|
||||
|
||||
switch (context.AllDoneSignal.ParticipantsRemaining)
|
||||
switch (context._participants)
|
||||
{
|
||||
case > 1:
|
||||
context.AllDoneSignal.RemoveParticipants(context.AllDoneSignal.ParticipantsRemaining - 1);
|
||||
context.RemoveParticipants(context._participants - 1);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
_ = context.AllDoneSignal.AddParticipant();
|
||||
context.AddParticipant();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user