         # File lib/em/deferrable.rb, line 122
    122:     def set_deferred_status status, *args
    123:       cancel_timeout
    124:       @deferred_status = status
    125:       @deferred_args = args
    126:       case @deferred_status
    127:       when :succeeded
    128:         if @callbacks
    129:           while cb = @callbacks.pop
    130:             cb.call(*@deferred_args)
    131:           end
    132:         end
    133:         @errbacks.clear if @errbacks
    134:       when :failed
    135:         if @errbacks
    136:           while eb = @errbacks.pop
    137:             eb.call(*@deferred_args)
    138:           end
    139:         end
    140:         @callbacks.clear if @callbacks
    141:       end
    142:     end