diff --git a/src/Snap.Hutao/Snap.Hutao/Core/Threading/AsyncBarrier.cs b/src/Snap.Hutao/Snap.Hutao/Core/Threading/AsyncBarrier.cs index facec57e..5ae015bc 100644 --- a/src/Snap.Hutao/Snap.Hutao/Core/Threading/AsyncBarrier.cs +++ b/src/Snap.Hutao/Snap.Hutao/Core/Threading/AsyncBarrier.cs @@ -25,7 +25,7 @@ internal class AsyncBarrier /// The number of participants. public AsyncBarrier(int participants) { - ArgumentOutOfRangeException.ThrowIfLessThan(participants, 1, "Participants of AsyncBarrier can not be less than 1"); + ArgumentOutOfRangeException.ThrowIfNegativeOrZero(participants, "Participants of AsyncBarrier must be greater than 0"); participantCount = participants; // Allocate the stack so no resizing is necessary.