       let timeout = dispatch_time(DISPATCH_TIME_NOW, Int64(ns))
 
       let perishable = map(queue) { $0 }
-      dispatch_after(timeout, queue) { perishable.cancel("Operation timed out") }
+      dispatch_after(timeout, queue) { perishable.cancel(reason) }
       return perishable
     }
 
-    return Deferred(error: DeferredError.Canceled("Operation timed out"))
+    return Deferred(error: DeferredError.Canceled(reason))
   }
 }
 


// MARK: maximum time until a `Deferred` becomes determined

extension Deferred
{
  /// Return a `Deferred` whose determination will occur at most `µs` microseconds from the time of evaluation.

  /// - parameter seconds: a number of seconds as a `Double` or `NSTimeInterval`
  /// - returns: a `Deferred` reference

  public func timeout(seconds s: Double, reason: String = DefaultTimeoutMessage) -> Deferred
  {
    return timeout(ns: Int(s*1e9), reason: reason)
  }

  /// Return a `Deferred` whose determination will occur at most `ns` nanoseconds from the time of evaluation.
  /// - parameter ns: a number of nanoseconds
  /// - returns: a `Deferred` reference

  public func timeout(ns ns: Int, reason: String = DefaultTimeoutMessage) -> Deferred
  {
    if self.isDetermined { return self }

