Class: JFlow::WorkerThread

Inherits:
Thread
  • Object
show all
Defined in:
lib/jflow/worker_thread.rb

Instance Method Summary collapse

Instance Method Details

#currently_polling?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/jflow/worker_thread.rb', line 16

def currently_polling?
  self["state"] == :polling
end

#currently_working?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/jflow/worker_thread.rb', line 12

def currently_working?
  self["state"] == :working
end

#mark_for_shutdownObject



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

Returns:

  • (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