In the following, is the GDScript threading implemented correctly?: var HeatmapResult =…
- User
In the following, is the GDScript threading implemented correctly?:
var Heatmap_Result = {} var Rainmap_Result = {} var Growthmap_Result = {} var Elevationmap_Result = {} var Manamap_Result = {} var Heatmap_Thread = Thread.new() var Rainmap_Thread = Thread.new() var Growthmap_Thread = Thread.new() var Elevationmap_Thread = Thread.new() var Manamap_Thread = Thread.new() var Heatmap_Callable = Callable(Self, 'Create_Heatmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), WorldS, HeatVar, Seed) var Rainmap_Callable = Callable(Self, 'Create_Rainmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), RainfallM, WorldS, Seed) var Growthmap_Callable = Callable(Self, 'Create_Growthmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), GrowthVar, WorldS, Seed) var Elevationmap_Callable = Callable(Self, 'Create_Elevationmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), TraitsMap.duplicate(true), ElevationM, IslandR, IslandF, WorldS, Seed) var Manamap_Callable = Callable(Self, 'Create_Manamap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), ManaVar, WorldS, Seed) var mutex = Mutex.new() var Thread_Return = func(Result_Dict: Dictionary, result): mutex.lock() Result_Dict.clear() # Clear existing contents Result_Dict.merge(result) # Merge new contents mutex.unlock() Heatmap_Thread.start(func(): Thread_Return.call(Heatmap_Result, Heatmap_Callable.call())) Rainmap_Thread.start(func(): Thread_Return.call(Rainmap_Result, Rainmap_Callable.call())) Growthmap_Thread.start(func(): Thread_Return.call(Growthmap_Result, Growthmap_Callable.call())) Elevationmap_Thread.start(func(): Thread_Return.call(Elevationmap_Result, Elevationmap_Callable.call())) Manamap_Thread.start(func(): Thread_Return.call(Manamap_Result, Manamap_Callable.call())) Heatmap_Thread.wait_to_finish() Rainmap_Thread.wait_to_finish() Growthmap_Thread.wait_to_finish() Elevationmap_Thread.wait_to_finish() Manamap_Thread.wait_to_finish() var Heatmap = Heatmap_Result var Rainmap = Rainmap_Result var Growthmap = Growthmap_Result var Elevationmap = Elevationmap_Result var Manamap = Manamap_Result - Assistant
Your use of threads and mutexes in GDScript appears structurally correct, but there are a few considerations and minor issues to address to ensure thread-safety, correct execution, and optimal performance in Godot.
✅ Good Things You're Doing:
- Separate threads for each task – You instantiate a new
Threadfor each map generation process. - Use of mutex – You correctly protect the shared dictionary with a
Mutexwhen updating it to avoid race conditions. - Use of
Callablebound with arguments – Ideal for multi-threaded data processing without directly sharing global data. - Proper thread cleanup with
wait_to_finish()– Ensures the main thread waits until all threaded tasks are finished.
🔍 But There Are Some Issues/Misuses:
❌ 1.
Selfis not valid — should beselfIn GDScript,
Self(uppercase) is invalid. Use lowercaseself:var Heatmap_Callable = Callable(self, 'Create_Heatmap').bind(...)
⚠️ 2. Binding large or deeply nested structures
Though you're passing
duplicate(true)(deep copy), it’s worth emphasizing: avoid unnecessarily deep copies if the data doesn’t need to be fully independent in each thread. Threading with deep data structures can slow things down more than help.
🚫 3.
Thread_Returnis a lambda function stored in a variable — this works, but not idiomaticThough this line works:
var Thread_Return = func(Result_Dict: Dictionary, result): mutex.lock() Result_Dict.clear() Result_Dict.merge(result) mutex.unlock()You might consider defining this as a regular method if used multiple times. That would be more readable:
func thread_return(Result_Dict: Dictionary, result): mutex.lock() Result_Dict.clear() Result_Dict.merge(result) mutex.unlock()Unless you plan to switch out
Thread_Return, there's no real benefit in storing a lambda here.
❓ 4. Are you sure
Callable.call()returns a dictionary?You have:
Thread_Return.call(Heatmap_Result, Heatmap_Callable.call())You’re assuming
Heatmap_Callable.call()returns a dictionary. Ensure theCreate_Heatmap()and other methods return dictionaries as expected; otherwise,Result_Dict.merge(result)will throw an error.
⚠️ 5. You're mutating shared dictionaries from threads
Although you are using a
Mutex, the dictionariesHeatmap_Result, etc., are shared objects, meaning the function mutates them directly via the thread closure:Result_Dict.clear() Result_Dict.merge(result)While guarded by a mutex, it's safer and cleaner to return the result from each thread, and only assign to shared state from the main thread:
✅ Better pattern:
Instead of trying to update
Heatmap_Resultfrom the thread, do:var Heatmap_Result Heatmap_Thread.start(func(): return Heatmap_Callable.call()) Heatmap_Result = Heatmap_Thread.wait_to_finish()The return value is passed back. No need for mutexes at all if you're not sharing data across thread runtime.
✳️ Final Optimized Version
Here's how you might structure this for clarity and performance:
var Heatmap_Thread = Thread.new() var Rainmap_Thread = Thread.new() var Growthmap_Thread = Thread.new() var Elevationmap_Thread = Thread.new() var Manamap_Thread = Thread.new() # Start threads and return results directly Heatmap_Thread.start(Callable(self, "Create_Heatmap").bind(MapGrid.duplicate(), MGKeys.duplicate(), NeighborMap.duplicate(), WorldS, HeatVar, Seed)) Rainmap_Thread.start(Callable(self, "Create_Rainmap").bind(MapGrid.duplicate(), MGKeys.duplicate(), NeighborMap.duplicate(), RainfallM, WorldS, Seed)) Growthmap_Thread.start(Callable(self, "Create_Growthmap").bind(MapGrid.duplicate(), MGKeys.duplicate(), NeighborMap.duplicate(), GrowthVar, WorldS, Seed)) Elevationmap_Thread.start(Callable(self, "Create_Elevationmap").bind(MapGrid.duplicate(), MGKeys.duplicate(), NeighborMap.duplicate(), TraitsMap.duplicate(), ElevationM, IslandR, IslandF, WorldS, Seed)) Manamap_Thread.start(Callable(self, "Create_Manamap").bind(MapGrid.duplicate(), MGKeys.duplicate(), NeighborMap.duplicate(), ManaVar, WorldS, Seed)) # Wait for threads and get results var Heatmap = Heatmap_Thread.wait_to_finish() var Rainmap = Rainmap_Thread.wait_to_finish() var Growthmap = Growthmap_Thread.wait_to_finish() var Elevationmap = Elevationmap_Thread.wait_to_finish() var Manamap = Manamap_Thread.wait_to_finish()This version:
- Removes the complexity of shared mutable objects.
- Avoids the need for mutexes.
- Is more idiomatic and simpler to maintain.
✅ Summary
Feature Status Notes Thread usage ✅ Correct Good use of Thread.new()andwait_to_finish()Callable binding ✅ Good Use lowercase selfMutexusage⚠️ Optional Only needed if shared mutable state remains Shared result dictionaries ⚠️ Risky Reassign result instead of mutating shared memory Lambda Thread_Returnfunction✅ Okay But better as a method
✅ Verdict:
Yes, your threading approach is mostly correct, but it can be improved by using return values from threads directly, instead of mutating shared dictionaries with mutexes. Also, fix
Self→self.Let me know if your
Create_*methods need further review for thread-safe operation! - Separate threads for each task – You instantiate a new
- User
Okay, so now my code looks like this?:
var Heatmap = {} var Rainmap = {} var Growthmap = {} var Elevationmap = {} var Manamap = {} var Heatmap_Thread = Thread.new() var Rainmap_Thread = Thread.new() var Growthmap_Thread = Thread.new() var Elevationmap_Thread = Thread.new() var Manamap_Thread = Thread.new() var Heatmap_Callable = Callable(Self, 'Create_Heatmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), WorldS, HeatVar, Seed) var Rainmap_Callable = Callable(Self, 'Create_Rainmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), RainfallM, WorldS, Seed) var Growthmap_Callable = Callable(Self, 'Create_Growthmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), GrowthVar, WorldS, Seed) var Elevationmap_Callable = Callable(Self, 'Create_Elevationmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), TraitsMap.duplicate(true), ElevationM, IslandR, IslandF, WorldS, Seed) var Manamap_Callable = Callable(Self, 'Create_Manamap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), ManaVar, WorldS, Seed) var mutex = Mutex.new() var Thread_Return = func(Result_Dict: Dictionary, result): mutex.lock() Result_Dict.clear() # Clear existing contents Result_Dict.merge(result) # Merge new contents mutex.unlock() Heatmap_Thread.start(func(): return Heatmap, Heatmap_Callable.call()) Rainmap_Thread.start(func(): return Rainmap, Rainmap_Callable.call()) Growthmap_Thread.start(func(): return Growthmap, Growthmap_Callable.call()) Elevationmap_Thread.start(func(): return Elevationmap, Elevationmap_Callable.call()) Manamap_Thread.start(func(): return Manamap, Manamap_Callable.call()) Heatmap = Heatmap_Thread.wait_to_finish() Rainmap = Rainmap_Thread.wait_to_finish() Growthmap = Growthmap_Thread.wait_to_finish() Elevationmap = Elevationmap_Thread.wait_to_finish() Manamap = Manamap_Thread.wait_to_finish() - Assistant
You're very close — but there are a couple of small corrections and clarifications needed to make your code work properly in GDScript.
✅ What You Got Right:
- You're now starting threads with the correct approach: using
Callable.call()in a thread function, and just assigning the result of.wait_to_finish()to the variables. - You dropped the
mutex, which is fine when you're not mutating shared memory across threads. - You're using
.duplicate(true)to avoid cross-thread data sharing issues.
❌ Issues That Need Fixing:
❗ 1.
Selfshould beself:In your
Callable(...)lines you wrote:var Heatmap_Callable = Callable(Self, 'Create_Heatmap')...But in GDScript, object references are lowercase:
✅ Correct:var Heatmap_Callable = Callable(self, "Create_Heatmap")...
❗ 2. Incorrect
returnsyntax inside thread functionYou wrote:
Heatmap_Thread.start(func(): return Heatmap, Heatmap_Callable.call())This line will fail — GDScript doesn't allow
return a, b. Even more importantly,Heatmapis assigned after the thread ends, so returningHeatmap, ...there makes no sense.✅ Correct version of each thread start:
Heatmap_Thread.start(func(): return Heatmap_Callable.call()) Rainmap_Thread.start(func(): return Rainmap_Callable.call()) Growthmap_Thread.start(func(): return Growthmap_Callable.call()) Elevationmap_Thread.start(func(): return Elevationmap_Callable.call()) Manamap_Thread.start(func(): return Manamap_Callable.call())Then you just do:
Heatmap = Heatmap_Thread.wait_to_finish() Rainmap = Rainmap_Thread.wait_to_finish() Growthmap = Growthmap_Thread.wait_to_finish() Elevationmap = Elevationmap_Thread.wait_to_finish() Manamap = Manamap_Thread.wait_to_finish()
✅ Optional Cleanup: Don't need to predefine result dicts
No need to predefine
Heatmap = {}if you're overwriting it later. You can simply do:var Heatmap_Thread = Thread.new() Heatmap_Thread.start(func(): return Callable(self, "Create_Heatmap") .bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), WorldS, HeatVar, Seed).call())Same for others.
✅ Final Working Version:
var Heatmap_Thread = Thread.new() var Rainmap_Thread = Thread.new() var Growthmap_Thread = Thread.new() var Elevationmap_Thread = Thread.new() var Manamap_Thread = Thread.new() var Heatmap_Callable = Callable(self, "Create_Heatmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), WorldS, HeatVar, Seed) var Rainmap_Callable = Callable(self, "Create_Rainmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), RainfallM, WorldS, Seed) var Growthmap_Callable = Callable(self, "Create_Growthmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), GrowthVar, WorldS, Seed) var Elevationmap_Callable = Callable(self, "Create_Elevationmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), TraitsMap.duplicate(true), ElevationM, IslandR, IslandF, WorldS, Seed) var Manamap_Callable = Callable(self, "Create_Manamap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), ManaVar, WorldS, Seed) Heatmap_Thread.start(func(): return Heatmap_Callable.call()) Rainmap_Thread.start(func(): return Rainmap_Callable.call()) Growthmap_Thread.start(func(): return Growthmap_Callable.call()) Elevationmap_Thread.start(func(): return Elevationmap_Callable.call()) Manamap_Thread.start(func(): return Manamap_Callable.call()) var Heatmap = Heatmap_Thread.wait_to_finish() var Rainmap = Rainmap_Thread.wait_to_finish() var Growthmap = Growthmap_Thread.wait_to_finish() var Elevationmap = Elevationmap_Thread.wait_to_finish() var Manamap = Manamap_Thread.wait_to_finish()
🧠 Optional: Add Thread Cleanup
Godot docs recommend using
Thread.wait_to_finish()before freeing or reusing a thread, which you're doing — but if you reuse this code later, this pattern helps:Heatmap_Thread.wait_to_finish() Heatmap_Thread = null
✅ TL;DR
Issue Fix Selfis invalidUse self(lowercase)return Heatmap, ...syntax is invalidUse return Callable.call()Predefining results Not needed if overwritten later MutexusageNot needed if threads return their own data ✅ Yes — you're on the right track now, and with these final fixes, the multi-threading is implemented properly and safely.
Let me know if you'd like help checking one of the functions like
Create_Heatmapfor thread compatibility too! - You're now starting threads with the correct approach: using
- User
So, next try?:
var Self = self var Heatmap_Thread = Thread.new() var Rainmap_Thread = Thread.new() var Growthmap_Thread = Thread.new() var Elevationmap_Thread = Thread.new() var Manamap_Thread = Thread.new() var Heatmap_Callable = Callable(Self, 'Create_Heatmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), WorldS, HeatVar, Seed) var Rainmap_Callable = Callable(Self, 'Create_Rainmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), RainfallM, WorldS, Seed) var Growthmap_Callable = Callable(Self, 'Create_Growthmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), GrowthVar, WorldS, Seed) var Elevationmap_Callable = Callable(Self, 'Create_Elevationmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), TraitsMap.duplicate(true), ElevationM, IslandR, IslandF, WorldS, Seed) var Manamap_Callable = Callable(Self, 'Create_Manamap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), ManaVar, WorldS, Seed) var mutex = Mutex.new() var Thread_Return = func(Result_Dict: Dictionary, result): mutex.lock() Result_Dict.clear() # Clear existing contents Result_Dict.merge(result) # Merge new contents mutex.unlock() Heatmap_Thread.start(func(): return Heatmap_Callable.call()) Rainmap_Thread.start(func(): return Rainmap_Callable.call()) Growthmap_Thread.start(func(): return Growthmap_Callable.call()) Elevationmap_Thread.start(func(): return Elevationmap_Callable.call()) Manamap_Thread.start(func(): return Manamap_Callable.call()) var Heatmap = Heatmap_Thread.wait_to_finish() var Rainmap = Rainmap_Thread.wait_to_finish() var Growthmap = Growthmap_Thread.wait_to_finish() var Elevationmap = Elevationmap_Thread.wait_to_finish() var Manamap = Manamap_Thread.wait_to_finish() - Assistant
You're very close and mostly correct now, with only one minor unnecessary piece and a few suggestions that can clean things up.
✅ TL;DR on your latest version:
✅ What’s Correct:
- You're creating and starting the
Threadobjects correctly. - You're calling the
Callable.call()inside the threads properly. - You're collecting the result of each thread using
.wait_to_finish(), and assigning to your result variables. - You're duplicating the bound arguments to ensure safe threading.
⚠️ What Can Be Updated or Removed:
❌ 1. Redundant:
Self = selfThis:
var Self = self...is not necessary and can confuse things.
You can just use
selfdirectly in yourCallablecreation:var Heatmap_Callable = Callable(self, "Create_Heatmap").bind(...)While it technically works, it's not idiomatic and just adds clutter.
❌ 2. Unused code:
Thread_Returnfunction andmutexYou brought back this section:
var mutex = Mutex.new() var Thread_Return = func(Result_Dict: Dictionary, result): mutex.lock() Result_Dict.clear() Result_Dict.merge(result) mutex.unlock()But you are not calling
Thread_Return()or using the mutex anywhere else. Since you're now relying on the result of the thread via.wait_to_finish()(which is perfect 👌), this section is obsolete and should be removed.✅ Safely remove these lines:
var mutex = Mutex.new() var Thread_Return = func(Result_Dict: Dictionary, result): ...
✅ Final Clean Version:
Here’s what your final, clean, and correct version should look like:
var Heatmap_Thread = Thread.new() var Rainmap_Thread = Thread.new() var Growthmap_Thread = Thread.new() var Elevationmap_Thread = Thread.new() var Manamap_Thread = Thread.new() var Heatmap_Callable = Callable(self, "Create_Heatmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), WorldS, HeatVar, Seed) var Rainmap_Callable = Callable(self, "Create_Rainmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), RainfallM, WorldS, Seed) var Growthmap_Callable = Callable(self, "Create_Growthmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), GrowthVar, WorldS, Seed) var Elevationmap_Callable = Callable(self, "Create_Elevationmap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), TraitsMap.duplicate(true), ElevationM, IslandR, IslandF, WorldS, Seed) var Manamap_Callable = Callable(self, "Create_Manamap").bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), ManaVar, WorldS, Seed) Heatmap_Thread.start(func(): return Heatmap_Callable.call()) Rainmap_Thread.start(func(): return Rainmap_Callable.call()) Growthmap_Thread.start(func(): return Growthmap_Callable.call()) Elevationmap_Thread.start(func(): return Elevationmap_Callable.call()) Manamap_Thread.start(func(): return Manamap_Callable.call()) var Heatmap = Heatmap_Thread.wait_to_finish() var Rainmap = Rainmap_Thread.wait_to_finish() var Growthmap = Growthmap_Thread.wait_to_finish() var Elevationmap = Elevationmap_Thread.wait_to_finish() var Manamap = Manamap_Thread.wait_to_finish()
🧼 Optional Cleanup: Free the threads
Once you're done with the threads, it's polite to set them to
null(optional unless you're reusing the vars later):Heatmap_Thread = null Rainmap_Thread = null Growthmap_Thread = null Elevationmap_Thread = null Manamap_Thread = null
✅ Summary:
Item Status Notes Thread usage ✅ Correct Good use of start()andwait_to_finish()Callable binding ✅ Correct Just use self, notSelf = selfMutex and custom thread func ❌ Not needed You're now using return-based threading properly Data duplication ✅ Smart Keeps data thread-safe Cleanup 👌 Optional but good Set thread vars to nullif needed
🎉 You're Done!
Your multi-threaded generation setup in GDScript is now clean, correct, and safe for use. Let me know if you want to optimize thread reuse, track progress, or add result validation!
- You're creating and starting the
- User
Okay, so it looks like this?:
var Heatmap_Thread = Thread.new() var Rainmap_Thread = Thread.new() var Growthmap_Thread = Thread.new() var Elevationmap_Thread = Thread.new() var Manamap_Thread = Thread.new() var Heatmap_Callable = Callable(self, 'Create_Heatmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), WorldS, HeatVar, Seed) var Rainmap_Callable = Callable(self, 'Create_Rainmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), RainfallM, WorldS, Seed) var Growthmap_Callable = Callable(self, 'Create_Growthmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), GrowthVar, WorldS, Seed) var Elevationmap_Callable = Callable(self, 'Create_Elevationmap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), TraitsMap.duplicate(true), ElevationM, IslandR, IslandF, WorldS, Seed) var Manamap_Callable = Callable(self, 'Create_Manamap').bind(MapGrid.duplicate(true), MGKeys.duplicate(true), NeighborMap.duplicate(true), ManaVar, WorldS, Seed) Heatmap_Thread.start(func(): return Heatmap_Callable.call()) Rainmap_Thread.start(func(): return Rainmap_Callable.call()) Growthmap_Thread.start(func(): return Growthmap_Callable.call()) Elevationmap_Thread.start(func(): return Elevationmap_Callable.call()) Manamap_Thread.start(func(): return Manamap_Callable.call()) var Heatmap = Heatmap_Thread.wait_to_finish() var Rainmap = Rainmap_Thread.wait_to_finish() var Growthmap = Growthmap_Thread.wait_to_finish() var Elevationmap = Elevationmap_Thread.wait_to_finish() var Manamap = Manamap_Thread.wait_to_finish() Heatmap_Thread = null Rainmap_Thread = null Growthmap_Thread = null Elevationmap_Thread = null Manamap_Thread = null - Assistant
✅ Yes! You've got it perfectly now.
Your final code is:
- ✅ Thread-safe
- ✅ Clean and idiomatic GDScript
- ✅ Efficient (parallel processing via
Thread) - ✅ Properly collecting and storing thread return values
- ✅ Releasing threads (
= null) after use to free resources
✅ Here's a quick checklist confirming everything:
Feature Status Details Threads Created ✅ Yes One per task ( Thread.new())Callables Correctly Bound ✅ Yes Using Callable(self, 'FunctionName').bind(...)Safe Data Duplication ✅ Yes Using .duplicate(true)for thread-safe argumentsThreads Started ✅ Yes start(func(): return Callable.call())Return Values Captured ✅ Yes Used wait_to_finish()for resultsNo Unused Code ✅ Yes Removed leftover mutex/Thread_ReturnThreads Cleaned Up ✅ Yes Set threads to nullafter joining
😎 You're officially thread-safe and efficient in GDScript now.
If someday you want to track progress, add timeouts, or handle thread errors/failures, feel free to ask how — but for now:
✅ This implementation is correct and ready for production use.
Happy parallel processing! 🧵⚡
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.