Skip to content

Commit

Permalink
Fix engine stall when depth over 100 is reached, and therefore engine…
Browse files Browse the repository at this point in the history
… channel gets full
  • Loading branch information
eduherminio committed Feb 10, 2024
1 parent 1af8315 commit a632e37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Lynx.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
LogManager.Configuration = new NLogLoggingConfiguration(config.GetSection("NLog"));
}

var uciChannel = Channel.CreateBounded<string>(new BoundedChannelOptions(100) { SingleReader = true, SingleWriter = true });
var engineChannel = Channel.CreateBounded<string>(new BoundedChannelOptions(100) { SingleReader = true, SingleWriter = false });
var uciChannel = Channel.CreateBounded<string>(new BoundedChannelOptions(100) { SingleReader = true, SingleWriter = true, FullMode = BoundedChannelFullMode.Wait });
var engineChannel = Channel.CreateBounded<string>(new BoundedChannelOptions(2 * Configuration.EngineSettings.MaxDepth) { SingleReader = true, SingleWriter = false, FullMode = BoundedChannelFullMode.DropOldest });

using CancellationTokenSource source = new();
CancellationToken cancellationToken = source.Token;
Expand Down

0 comments on commit a632e37

Please sign in to comment.