about summary refs log tree commit diff
path: root/MatrixUtils.Web/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixUtils.Web/Program.cs')
-rw-r--r--MatrixUtils.Web/Program.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/MatrixUtils.Web/Program.cs b/MatrixUtils.Web/Program.cs

index cad5393..bc047e8 100644 --- a/MatrixUtils.Web/Program.cs +++ b/MatrixUtils.Web/Program.cs
@@ -20,13 +20,13 @@ builder.RootComponents.Add<HeadOutlet>("head::after"); // builder.Logging.SetMinimumLevel(LogLevel.Trace); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); -builder.Services.AddBlazorJSRuntime(); +builder.Services.AddBlazorJSRuntime(out var jsRuntime); builder.Services.AddWebWorkerService(webWorkerService => { // Optionally configure the WebWorkerService service before it is used // Default WebWorkerService.TaskPool settings: PoolSize = 0, MaxPoolSize = 1, AutoGrow = true // Below sets TaskPool max size to 2. By default the TaskPool size will grow as needed up to the max pool size. // Setting max pool size to -1 will set it to the value of navigator.hardwareConcurrency - webWorkerService.TaskPool.MaxPoolSize = 2; + webWorkerService.TaskPool.MaxPoolSize = -1; // Below is telling the WebWorkerService TaskPool to set the initial size to 2 if running in a Window scope and 0 otherwise // This starts up 2 WebWorkers to handle TaskPool tasks as needed webWorkerService.TaskPool.PoolSize = webWorkerService.GlobalScope == GlobalScope.Window ? 0 : 0;