diff options
author | John Keiser <jkeiser@opscode.com> | 2014-06-02 20:17:20 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-06-02 20:17:20 -0700 |
commit | e87d5721b73caf4832feb55a2c04d5217d71b809 (patch) | |
tree | caa0671c965d0f7eae195ac0c3c4df9afdd2e972 /lib/chef/chef_fs | |
parent | 7588211ecb83c9592065359622ff6cef98d773af (diff) | |
download | chef-e87d5721b73caf4832feb55a2c04d5217d71b809.tar.gz |
Do not wait for clean exit when Exception is thrownjk/exiterror
Diffstat (limited to 'lib/chef/chef_fs')
-rw-r--r-- | lib/chef/chef_fs/parallelizer/parallel_enumerable.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb index 8e50f361db..8845b6926a 100644 --- a/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +++ b/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb @@ -195,13 +195,15 @@ class Chef process_one end end - ensure - # If someone called "first" or something that exits the enumerator - # early, we want to make sure and throw away any extra results - # (gracefully) so that the next enumerator can start over. + rescue + # If we exited early, perhaps due to any? finding a result, we want + # to make sure and throw away any extra results (gracefully) so that + # the next enumerator can start over. if !finished? stop end + raise + ensure @each_running = false end end |