             pendingTasks.removeObjectAtIndex(0)
             executingTasks.insert(task)
             task.resume()
+            NSNotificationCenter.defaultCenter().postNotificationName(SessionTaskDidResumeNotification, object: task)
             setNeedsExecute()
         }
     }


// MARK: TaskQueue

/// Limits number of concurrent tasks, prevents trashing of NSURLSession
final class TaskQueue {
    var maxExecutingTaskCount = 8

            pendingTasks.removeObject(task)
        } else if executingTasks.contains(task) {
            executingTasks.remove(task)
            NSNotificationCenter.defaultCenter().postNotificationName(SessionTaskDidCompleteNotification, object: task)
            setNeedsExecute()
        }
    }
