Fix concurrency deadlock
I'm stupid and forgot it divided the number of iterations by 8, no wonder it was so fast lmao
This commit is contained in:
@@ -71,7 +71,7 @@ public struct ActionSet
|
||||
public readonly bool IsEmpty => bits == 0;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly ActionType SelectRandom(Random random) => ElementAt(0);// random.Next(Count));
|
||||
public readonly ActionType SelectRandom(Random random) => ElementAt(random.Next(Count));
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ActionType? PopRandomConcurrent(Random random)
|
||||
@@ -117,7 +117,6 @@ public struct ActionSet
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ActionType PopRandom(Random random)
|
||||
{
|
||||
return PopFirst();
|
||||
var action = ElementAt(random.Next(Count));
|
||||
RemoveAction(action);
|
||||
return action;
|
||||
|
||||
Reference in New Issue
Block a user