                 self.fulfillCallbacks.removeAll(keepCapacity: false)
             }
         }
+        dispatch_semaphore_signal(self.mutex)
     }
 
     public func reject(error: NSError) {
-        performSync {
+        dispatch_semaphore_wait(self.mutex, DISPATCH_TIME_FOREVER)
+        do {
             if case .Pending = self.state {
                 self.state = .Rejected(error)
 

                self.rejectCallbacks.removeAll(keepCapacity: false)
            }
        }
    }
}



    private var rejectCallbacks: [(NSError) -> Void] = []

    /// Allow the execution of just one thread from many others.
    private let mutex = dispatch_semaphore_create(1)

    public init() {
    }

    public convenience init(block: Promise<T> -> Void) {
