                     return
                 })
             }
-            
+
             let result = jobWithProgress(progressCallback: progressCallback)
-            
+
             dispatch_async(currentQueue, {
-                
+
                 if self.finishedOrCanceled {
                     return
                 }
-                
+
                 dispatch_sync(queue) { self.finishedOrCanceled = true }
-                
+
                 didLoadDataBlock?(result: result)
             })
         })

    let jobWithProgress = { (progressCallback: AsyncProgressCallback?) -> AsyncResult<Value, Error> in
        return job()
    }
    
    return async(
        jobWithProgress: jobWithProgress,
        queueName      : queueName,

}

func async<Value, Error: ErrorType>(jobWithProgress: AsyncTypes<Value, Error>.SyncOperation, queueName: String, isSerialQueue: Bool) -> AsyncTypes<Value, Error>.Async {

    assert(NSThread.isMainThread())
    let attr = isSerialQueue
        ?DISPATCH_QUEUE_SERIAL
        :DISPATCH_QUEUE_CONCURRENT

    return async(
        job         : jobWithProgress,
        queueName   : queueName,
