def on_threadpool?
      tp = nil

      @mutex.synchronize do
        return false unless @threadpool # you can't dup nil
        tp = @threadpool.dup
      end

      tp.respond_to?(:include?) and tp.include?(Thread.current)
    end
def on_threadpool?
      tp = nil

      @mutex.synchronize do
        return false unless @threadpool # you can't dup nil
        tp = @threadpool.dup
      end

      tp.respond_to?(:include?) and tp.include?(Thread.current)
    end
def on_threadpool? tp = nil @mutex . synchronize do return false unless @threadpool # you can't dup nil tp = @threadpool . dup end tp . respond_to? ( :include? ) and tp . include? ( Thread . current ) end
returns true if the current thread is one of the threadpool threads
returns true if the current thread is one of the threadpool threads