Class: EXEL::Providers::ThreadedAsyncProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/exel/providers/threaded_async_provider.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ ThreadedAsyncProvider

Returns a new instance of ThreadedAsyncProvider.



4
5
6
# File 'lib/exel/providers/threaded_async_provider.rb', line 4

def initialize(context)
  @context = context
end

Instance Method Details

#do_async(block) ⇒ Object



8
9
10
# File 'lib/exel/providers/threaded_async_provider.rb', line 8

def do_async(block)
  Thread.new { block.start(@context.deep_dup) }
end