From d8ce6e4ce5513940f7866aabdbab1b4f01931ddb Mon Sep 17 00:00:00 2001 From: glax Date: Fri, 21 Apr 2023 15:14:02 +0200 Subject: [PATCH] Mutlithreaded RegionManager --- Server/Server.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Server/Server.cs b/Server/Server.cs index 7ab6653..121477c 100644 --- a/Server/Server.cs +++ b/Server/Server.cs @@ -26,7 +26,7 @@ public class Server Coordinates start = new (48.7933798f, 9.8275859f); Coordinates finish = new (48.795918f, 9.021618f); - TestVariables(workingDir, start, finish, 16); + TestVariables(workingDir, start, finish, 32); /* string parentFolder = new DirectoryInfo(workingDir).Parent!.FullName; @@ -72,6 +72,8 @@ public class Server private static void TestVariables(string workingDir, Coordinates start, Coordinates finish, int threads) { string parentFolder = new DirectoryInfo(workingDir).Parent!.FullName; + + RegionManager rm = new (workingDir); Queue calcThreads = new(); @@ -86,7 +88,7 @@ public class Server double factor = angleWeightFactor; calcThreads.Enqueue(new Thread(() => { - Pathfinder testresult = new Pathfinder(workingDir).AStar(start, + Pathfinder testresult = new Pathfinder(rm).AStar(start, finish, Tag.SpeedType.car, priority, roadPriority, 0, factor); string fileName =