     /**
      Adds a failure callback to the promise.
      
+     This callback will be called once this promise has been rejected. The callback will
+     be called on the main thread.
+     
+     - parameter callback: The callback to call when the promise is rejected.
+     
+     - returns: This promise, allowing to chain multiple callbacks together.
+     */
+    public func failure(callback: FailedCallback?) -> Self {
+        guard let callback = callback else {
+            return self
+        }
+        return failure(on: dispatch_get_main_queue(), callback: callback)
+    }
+    
+    /**
+     Adds a failure callback to the promise.
+     
      This callback will be called once this promise has been rejected.
      
+     - parameter queue: The queue on which to perform the `callback` block or `nil` to dispatch on the main thread.
      - parameter callback: The callback to call when the promise is rejected.
      
      - returns: This promise, allowing to chain multiple callbacks together.
      */
-    public func failure(callback: FailedCallback?) -> Self {
-        guard callback != nil else {
-            return self
-        }
-        
+    public func failure(on queue: dispatch_queue_t, callback: FailedCallback) -> Self {
         switch status {
         case .Fulfilled:
             break
             
         case .Rejected(let error):
-            callback!(error)
+            Promise.dispatch(on: queue) {
+                callback(error)
+            }
             
         case .Pending:
             dispatch_barrier_sync(barrier) {

     - returns: A new promise, combining this promise and the value returned from `then`.
     */
    public func then<U>(on queue: dispatch_queue_t? = nil, then: (Value) throws -> U) -> Promise<U> {
        let thenPromise = Promise<U> { thenPromise in
            self.success { value in
                Promise.dispatch(on: queue) {
                    do {
                        let nextValue = try then(value)
                        thenPromise.fulfill(nextValue)
                    } catch {
                        thenPromise.reject(error)
                    }
                }
            }.failure(thenPromise.reject)
        }
        
        thenPromise.parent = self
        nonCancelledChildrenCount += 1
        return thenPromise
    }
    
    // MARK: - Success / Failure

        didSet {
            switch unsafeStatus {
            case .Fulfilled(let result):
                for (callback, queue) in succeededCallbacks {
                    Promise.dispatch(on: queue) {
                        callback(result)
                    }
                }
                self.detach()
                
            case .Rejected(let error):
                for (callback, queue) in failedCallbacks {
                    Promise.dispatch(on: queue) {
                        callback(error)
                    }
                }
                self.detach()
                
