src/Pure/Tools/build_process.scala
changeset 78571 ed07f0ebf31c
parent 78570 25c04910dcfa
child 78573 980f3cfcbc2c
--- a/src/Pure/Tools/build_process.scala	Wed Aug 23 11:31:17 2023 +0200
+++ b/src/Pure/Tools/build_process.scala	Wed Aug 23 11:44:08 2023 +0200
@@ -954,10 +954,7 @@
           yield Build_Process.Task(session.name, session.deps, JSON.Object.empty, build_uuid))
     val pending1 = new_pending ::: state.pending
 
-    state.copy(
-      numa_nodes = Host.numa_nodes(enabled = build_context.numa_shuffling),
-      sessions = sessions1,
-      pending = pending1)
+    state.copy(sessions = sessions1, pending = pending1)
   }
 
   protected def next_jobs(state: Build_Process.State): List[String] = {
@@ -1090,9 +1087,12 @@
   /* run */
 
   def run(): Build.Results = {
-    if (build_context.master) {
-      _build_cluster.init()
-      synchronized_database("Build_Process.init") { _state = init_state(_state) }
+    synchronized_database("Build_Process.init") {
+      if (build_context.master) {
+        _build_cluster.init()
+        _state = init_state(_state)
+      }
+      _state = _state.copy(numa_nodes = Host.numa_nodes(enabled = build_context.numa_shuffling))
     }
 
     def finished(): Boolean = synchronized_database("Build_Process.test") {