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:
Asriel Camora
2023-07-07 13:01:17 +02:00
parent d5a8288439
commit 1386f9150c
7 changed files with 71 additions and 71 deletions
+1 -2
View File
@@ -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;