diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-10-02 19:39:09 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-10-02 19:39:09 -0700 |
commit | 9feae3d413eaf343a201fdb39a75f5001e1783a3 (patch) | |
tree | c7b5e065cf8e293301d051e6e90fcc0686c16c04 /lib | |
parent | 556f3201f5197f1df9814fbeaeb0e028a97b067f (diff) | |
download | chef-9feae3d413eaf343a201fdb39a75f5001e1783a3.tar.gz |
add a comment explaining what we're doing.lcg/thread-local-event-storage
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/event_dispatch/dispatcher.rb | 5 |
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 |