From e0ad7a9fb4bce64d3c5503877cc1b37086f8c2ab Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 13 Aug 2018 14:24:25 +0200 Subject: [PATCH] Add answer commments to some puzzling code --- cura/Settings/GlobalStack.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index 49c7b4f04a..dda21f3719 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -102,6 +102,9 @@ class GlobalStack(CuraContainerStack): # Handle the "resolve" property. #TODO: Why the hell does this involve threading? + # Answer: Because if multiple threads start resolving properties that have the same underlying properties that's + # related, without taking a note of which thread a resolve paths belongs to, they can bump into each other and + # generate unexpected behaviours. if self._shouldResolve(key, property_name, context): current_thread = threading.current_thread() self._resolving_settings[current_thread.name].add(key)