1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Fix incorrect thread name (#1368)

This commit is contained in:
Hirohisa Mitsuishi 2017-08-03 09:48:40 +09:00 committed by Nate Berkopec
parent d31d68a610
commit 26adcb47fb

View file

@ -71,9 +71,9 @@ module Puma
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