Method: Contender::SimpleThreadFactory#create

Defined in:
lib/contender/thread_factory.rb

#create { ... } ⇒ Thread

Yields:

Returns:

  • (Thread)


28
29
30
31
32
33
34
35
# File 'lib/contender/thread_factory.rb', line 28

def create(&block)
  thread = Thread.new &block
  thread.priority = @priority

  @group.add thread

  thread
end