         d2.fill("foo")
 
         let expectation = expectationWithDescription("paired deferred should be filled")
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
-            while (!both.isFilled) { /* spin */ }
+        both.upon { _ in
+            XCTAssert(d1.isFilled)
+            XCTAssert(d2.isFilled)
             XCTAssertEqual(both.value.0, 1)
             XCTAssertEqual(both.value.1, "foo")
             expectation.fulfill()

            XCTAssertFalse(w.isFilled) // unfilled because d[0] is still unfilled
            d[0].fill(0)

            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
                while (!w.isFilled) { /* spin */ }
                XCTAssertTrue(w.value == [Int](0 ..< d.count))
                innerExpectation.fulfill()
            }

    }

    func testAny() {
        let d = map(0 ..< 10) { _ in Deferred<Int>() }
        let w = any(d)

        d[3].fill(3)

        let outerExpectation = expectationWithDescription("any is filled")
        let innerExpectation = expectationWithDescription("any is not changed")

        after(0.1) {
            XCTAssertEqual(w.value.value, 3)

            d[4].fill(4)

            after(0.1) {
                XCTAssertEqual(w.value.value, 3)
                innerExpectation.fulfill()
            }

            outerExpectation.fulfill()
        }

        waitForExpectationsWithTimeout(1, handler: nil)
