Skip to content

Commit

Permalink
Log a warning when attempting to resume a dead task
Browse files Browse the repository at this point in the history
  • Loading branch information
halorgium committed Aug 8, 2013
1 parent b6194e4 commit 373d55b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/celluloid/tasks.rb
Expand Up @@ -91,7 +91,11 @@ def suspend(status)

# Resume a suspended task, giving it a value to return if needed
def resume(value = nil)
deliver(value)
if running?
deliver(value)
else
Celluloid.logger.warn "Attempted to resume a dead task: type=#{@type.inspect}, meta=#{@meta.inspect}, status=#{@status.inspect}"
end
nil
end

Expand Down

0 comments on commit 373d55b

Please sign in to comment.