Skip to content

Commit

Permalink
Fix incorrect thread name (#1368)
Browse files Browse the repository at this point in the history
  • Loading branch information
bongole authored and nateberkopec committed Aug 3, 2017
1 parent d31d68a commit 26adcb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puma/thread_pool.rb
Expand Up @@ -71,9 +71,9 @@ def backlog
def spawn_thread
@spawned += 1

th = Thread.new do
th = Thread.new(@spawned) do |spawned|
# Thread name is new in Ruby 2.3
Thread.current.name = 'puma %03i' % @spawned if Thread.current.respond_to?(:name=)
Thread.current.name = 'puma %03i' % spawned if Thread.current.respond_to?(:name=)
todo = @todo
block = @block
mutex = @mutex
Expand Down

0 comments on commit 26adcb4

Please sign in to comment.