Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
genaray committed Mar 14, 2024
1 parent 2e3f159 commit d25d006
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 11 additions & 2 deletions Arch.Extended.Sample/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<GameTime> _systems;
Expand Down Expand Up @@ -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++)
Expand Down
2 changes: 0 additions & 2 deletions Arch.Extended.Sample/Systems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d25d006

Please sign in to comment.