From d25d006f26de2137bc63de52323518277e98dd97 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 14 Mar 2024 17:23:21 +0100 Subject: [PATCH] Fix --- Arch.Extended.Sample/Game.cs | 13 +++++++++++-- Arch.Extended.Sample/Systems.cs | 2 -- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Arch.Extended.Sample/Game.cs b/Arch.Extended.Sample/Game.cs index 52670d2..d0c39d9 100644 --- a/Arch.Extended.Sample/Game.cs +++ b/Arch.Extended.Sample/Game.cs @@ -14,6 +14,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using NUnit.Framework; +using Schedulers; using Utf8Json; using Utf8Json.Formatters; using Utf8Json.Resolvers; @@ -27,7 +28,7 @@ public class Game : Microsoft.Xna.Framework.Game { // The world and a job scheduler for multithreading private World _world; - private global::JobScheduler.JobScheduler _jobScheduler; + private JobScheduler _jobScheduler; // Our systems processing entities private System.Group _systems; @@ -66,7 +67,15 @@ protected override void BeginRun() // Create world & JobScheduler for multithreading _world = World.Create(); - _jobScheduler = new("SampleWorkerThreads"); + _jobScheduler = new( + new JobScheduler.Config + { + ThreadPrefixName = "Arch.Samples", + ThreadCount = 0, + MaxExpectedConcurrentJobs = 64, + StrictAllocationMode = false, + } + ); // Spawn in entities with position, velocity and sprite for (var index = 0; index < 1000; index++) diff --git a/Arch.Extended.Sample/Systems.cs b/Arch.Extended.Sample/Systems.cs index 974caba..e1ce179 100644 --- a/Arch.Extended.Sample/Systems.cs +++ b/Arch.Extended.Sample/Systems.cs @@ -5,8 +5,6 @@ using Arch.LowLevel; using Arch.System; using Arch.System.SourceGenerator; -using JobScheduler; -using JobScheduler.Extensions; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input;