Sha256: c97067edefa34b59903ca4bf8fa3a1fab91215fd51794c8dd9f01ce3d3372543

Contents?: true

Size: 407 Bytes

Versions: 17

Compression:

Stored size: 407 Bytes

Contents

module JFlow
  class WorkerThread < Thread

    def mark_for_shutdown
      self["marked_for_shutdown"] = true
    end

    def marked_for_shutdown?
      self["marked_for_shutdown"] == true
    end

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

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

    def set_state(state)
      self["state"] = state
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
jflow-0.5.1 lib/jflow/worker_thread.rb
jflow-0.5.0 lib/jflow/worker_thread.rb
jflow-0.4.5 lib/jflow/worker_thread.rb
jflow-0.4.4 lib/jflow/worker_thread.rb
jflow-0.4.3 lib/jflow/worker_thread.rb
jflow-0.4.2 lib/jflow/worker_thread.rb
jflow-0.4.1 lib/jflow/worker_thread.rb
jflow-0.4.0 lib/jflow/worker_thread.rb
jflow-0.3.6 lib/jflow/worker_thread.rb
jflow-0.3.5 lib/jflow/worker_thread.rb
jflow-0.3.4 lib/jflow/worker_thread.rb
jflow-0.3.3 lib/jflow/worker_thread.rb
jflow-0.3.2 lib/jflow/worker_thread.rb
jflow-0.3.1 lib/jflow/worker_thread.rb
jflow-0.3.0 lib/jflow/worker_thread.rb
jflow-0.2.9 lib/jflow/worker_thread.rb
jflow-0.2.8 lib/jflow/worker_thread.rb