Skip to content

Commit

Permalink
fix: tunning no yielding limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Farenheith committed Nov 15, 2024
1 parent 6a33598 commit dd37c4d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Codibre.EnumerableExtensions.Branching.Internal;
internal sealed record BranchContext<T>(Func<BranchContext<T>, ValueTask<LinkedNode<T>?>> GetNext, int _branchCount)
{
private ushort _count = 0;
private readonly ushort _limit = 1024;
private readonly ushort _limit = ushort.MaxValue / 2;

internal ValueTask<LinkedNode<T>?> FillNext()
=> ++_count <= _limit ? GetNext(this) : GetYielded();
Expand Down

0 comments on commit dd37c4d

Please sign in to comment.