class Puma::ThreadPool::ProcessorThread

Attributes

marked_as_io_thread[W]
thread[RW]

Public Class Methods

new(pool) click to toggle source
# File lib/puma/thread_pool.rb, line 32
def initialize(pool)
  @pool = pool
  @thread = nil
  @marked_as_io_thread = false
end

Public Instance Methods

[](key) click to toggle source
# File lib/puma/thread_pool.rb, line 64
def [](key)
  @thread[key]
end
alive?() click to toggle source
# File lib/puma/thread_pool.rb, line 52
def alive?
  @thread&.alive?
end
join(...) click to toggle source
# File lib/puma/thread_pool.rb, line 56
def join(...)
  @thread.join(...)
end
kill(...) click to toggle source
# File lib/puma/thread_pool.rb, line 60
def kill(...)
  @thread.kill(...)
end
mark_as_io_thread!() click to toggle source
# File lib/puma/thread_pool.rb, line 38
def mark_as_io_thread!
  unless @marked_as_io_thread
    @marked_as_io_thread = true

    # Immediately signal the pool that it can spawn a new thread
    # if there's some work in the queue.
    @pool.spawn_thread_if_needed
  end
end
marked_as_io_thread?() click to toggle source
# File lib/puma/thread_pool.rb, line 48
def marked_as_io_thread?
  @marked_as_io_thread
end
raise(...) click to toggle source
# File lib/puma/thread_pool.rb, line 68
def raise(...)
  @thread.raise(...)
end