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