summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/event_dispatch/dispatcher.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/event_dispatch/dispatcher.rb b/lib/chef/event_dispatch/dispatcher.rb
index 748a04f04c..b4a2d7879b 100644
--- a/lib/chef/event_dispatch/dispatcher.rb
+++ b/lib/chef/event_dispatch/dispatcher.rb
@@ -15,6 +15,11 @@ class Chef
@subscribers = subscribers
end
+ # Since the cookbook synchronizer will call this object from threads, we
+ # have to deal with concurrent access to this object. Since we don't want
+ # threads to handle events from other threads, we just use thread local
+ # storage.
+ #
def event_list
Thread.current[:chef_client_event_list] ||= []
end