Class: ThreadPool::Job

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(*args, &handler) ⇒ Job

Returns a new instance of Job.



14
15
16
# File 'lib/threadpool.rb', line 14

def initialize(*args, &handler)
  @args, @handler = args, handler
end

Instance Method Details

#runObject



18
19
20
# File 'lib/threadpool.rb', line 18

def run
  @handler.call(*@args)
end