Class: Pitchfork::HttpServer::TimeoutHandler::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/pitchfork/http_server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(thread, rack_env) ⇒ Info

Returns a new instance of Info.



21
22
23
24
# File 'lib/pitchfork/http_server.rb', line 21

def initialize(thread, rack_env)
  @thread = thread
  @rack_env = rack_env
end

Instance Attribute Details

#rack_envObject (readonly)

Returns the value of attribute rack_env.



19
20
21
# File 'lib/pitchfork/http_server.rb', line 19

def rack_env
  @rack_env
end

#threadObject (readonly)

Returns the value of attribute thread.



19
20
21
# File 'lib/pitchfork/http_server.rb', line 19

def thread
  @thread
end

Instance Method Details

#copy_thread_variables!Object



26
27
28
29
30
31
32
33
34
# File 'lib/pitchfork/http_server.rb', line 26

def copy_thread_variables!
  current_thread = Thread.current
  @thread.keys.each do |key|
    current_thread[key] = @thread[key]
  end
  @thread.thread_variables.each do |variable|
    current_thread.thread_variable_set(variable, @thread.thread_variable_get(variable))
  end
end