Module: SolidQueue::Processes::Runnable
- Includes:
- Supervised
- Defined in:
- lib/solid_queue/processes/runnable.rb
Instance Attribute Summary collapse
-
#mode ⇒ Object
writeonly
Sets the attribute mode.
Instance Method Summary collapse
Methods included from Supervised
Instance Attribute Details
#mode=(value) ⇒ Object
Sets the attribute mode
7 8 9 |
# File 'lib/solid_queue/processes/runnable.rb', line 7 def mode=(value) @mode = value end |
Instance Method Details
#start ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/solid_queue/processes/runnable.rb', line 9 def start boot if running_async? @thread = create_thread { run } else run end end |
#stop ⇒ Object
19 20 21 22 23 24 |
# File 'lib/solid_queue/processes/runnable.rb', line 19 def stop super wake_up @thread&.join end |