Skip to content

Commit

Permalink
avoid leaving garbage in the thread pool
Browse files Browse the repository at this point in the history
  • Loading branch information
godfat committed Jan 6, 2015
1 parent 35812df commit f6da085
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rest-core/promise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def defer
self.task = client_class.thread_pool.defer(mutex) do
Thread.current[:backtrace] = backtrace
protected_yield{ yield }
Thread.current[:backtrace] = nil
end
else
self.thread = Thread.new do
Expand Down

0 comments on commit f6da085

Please sign in to comment.