mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Ignore forksafe threads for warning (#2475)
This commit is contained in:
parent
c1b6071ae3
commit
b6ca443bb8
2 changed files with 5 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
* Bugfixes
|
||||
* Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
|
||||
* Ignore Rails' reaper thread (and any thread marked forksafe) for warning ([#2475])
|
||||
* Ignore illegal (by Rack spec) response header ([#2439])
|
||||
* Close idle connections immediately on shutdown ([#2460])
|
||||
* Fix some instances of phased restart errors related to the `json` gem (#2473)
|
||||
|
|
|
@ -331,13 +331,15 @@ module Puma
|
|||
|
||||
log "* Process workers: #{@options[:workers]}"
|
||||
|
||||
before = Thread.list
|
||||
# Threads explicitly marked as fork safe will be ignored.
|
||||
# Used in Rails, but may be used by anyone.
|
||||
before = Thread.list.reject { |t| t.thread_variable_get(:fork_safe) }
|
||||
|
||||
if preload?
|
||||
log "* Preloading application"
|
||||
load_and_bind
|
||||
|
||||
after = Thread.list
|
||||
after = Thread.list.reject { |t| t.thread_variable_get(:fork_safe) }
|
||||
|
||||
if after.size > before.size
|
||||
threads = (after - before)
|
||||
|
|
Loading…
Add table
Reference in a new issue