.bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid.rb
def detect_recursion
      actor = Thread.current[:celluloid_actor]
      return unless actor

      task = Thread.current[:celluloid_task]
      return unless task

      chain_id = CallChain.current_id
      actor.tasks.to_a.any? { |t| t != task && t.chain_id == chain_id }
    end
# Detect if a particular call is recursing through multiple actors
Detect if a particular call is recursing through multiple actors
Detect if a particular call is recursing through multiple actors
def detect_recursion
      actor = Thread.current[:celluloid_actor]
      return unless actor
      task = Thread.current[:celluloid_task]
      return unless task
      chain_id = CallChain.current_id
      actor.tasks.to_a.any? { |t| t != task && t.chain_id == chain_id }
    end
def detect_recursion actor = Thread . current [ :celluloid_actor ] return unless actor task = Thread . current [ :celluloid_task ] return unless task chain_id = CallChain . current_id actor . tasks . to_a . any? { | t | t != task && t . chain_id == chain_id } end
Detect if a particular call is recursing through multiple actors
Detect if a particular call is recursing through multiple actors