Class: Datastar::ThreadExecutor
- Inherits:
-
Object
- Object
- Datastar::ThreadExecutor
- Defined in:
- lib/datastar/configuration.rb
Overview
The default executor based on Ruby threads
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#new_queue ⇒ Object
9 |
# File 'lib/datastar/configuration.rb', line 9 def new_queue = Queue.new |
#prepare(response) ⇒ Object
11 |
# File 'lib/datastar/configuration.rb', line 11 def prepare(response); end |
#spawn(&block) ⇒ Object
13 14 15 |
# File 'lib/datastar/configuration.rb', line 13 def spawn(&block) Thread.new(&block) end |
#stop(threads) ⇒ Object
17 18 19 |
# File 'lib/datastar/configuration.rb', line 17 def stop(threads) threads.each(&:kill) end |