Class: JFlow::WorkerThread
- Inherits:
-
Thread
- Object
- Thread
- JFlow::WorkerThread
- Defined in:
- lib/jflow/worker_thread.rb
Instance Method Summary collapse
- #currently_polling? ⇒ Boolean
- #currently_working? ⇒ Boolean
- #mark_for_shutdown ⇒ Object
- #marked_for_shutdown? ⇒ Boolean
- #set_state(state) ⇒ Object
Instance Method Details
#currently_polling? ⇒ Boolean
16 17 18 |
# File 'lib/jflow/worker_thread.rb', line 16 def currently_polling? self["state"] == :polling end |
#currently_working? ⇒ Boolean
12 13 14 |
# File 'lib/jflow/worker_thread.rb', line 12 def currently_working? self["state"] == :working end |
#mark_for_shutdown ⇒ Object
4 5 6 |
# File 'lib/jflow/worker_thread.rb', line 4 def mark_for_shutdown self["marked_for_shutdown"] = true end |
#marked_for_shutdown? ⇒ Boolean
8 9 10 |
# File 'lib/jflow/worker_thread.rb', line 8 def marked_for_shutdown? self["marked_for_shutdown"] == true end |
#set_state(state) ⇒ Object
20 21 22 |
# File 'lib/jflow/worker_thread.rb', line 20 def set_state(state) self["state"] = state end |