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

36 lines
619 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2011-09-22 22:24:43 -04:00
# Standard libraries
require 'socket'
require 'tempfile'
require 'time'
require 'etc'
require 'uri'
require 'stringio'
require 'thread'
module Puma
autoload :Const, 'puma/const'
autoload :Server, 'puma/server'
autoload :Launcher, 'puma/launcher'
def self.stats_object=(val)
@get_stats = val
end
def self.stats
@get_stats.stats.to_json
end
def self.stats_hash
@get_stats.stats
end
2019-09-15 04:52:34 -04:00
# Thread name is new in Ruby 2.3
def self.set_thread_name(name)
return unless Thread.current.respond_to?(:name=)
Thread.current.name = "puma #{name}"
end
end