   case Canceled(String)
   case AlreadyDetermined(String)
   case CannotDetermine(String)
+  case Undetermined
 }
 
 /**


public class Deferred<T>
{
  private var r: Result<T>! = nil
  private let group = dispatch_group_create()

  // Swift does not have a facility to read and write enum values atomically.

  private init()
  {
    dispatch_group_enter(group)
    r = Result(error: DeferredError.Undetermined)
  }

  deinit
  {
    if isDetermined == false
    {
      dispatch_group_leave(group)
    }
