Upgrade version of RxSwift, RxCocoa, Alamofire.
This commit is contained in:
19
Pods/Alamofire/Source/TaskDelegate.swift
generated
19
Pods/Alamofire/Source/TaskDelegate.swift
generated
@ -1,7 +1,7 @@
|
||||
//
|
||||
// TaskDelegate.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
@ -40,17 +40,30 @@ open class TaskDelegate: NSObject {
|
||||
public var error: Error?
|
||||
|
||||
var task: URLSessionTask? {
|
||||
didSet { reset() }
|
||||
set {
|
||||
taskLock.lock(); defer { taskLock.unlock() }
|
||||
_task = newValue
|
||||
}
|
||||
get {
|
||||
taskLock.lock(); defer { taskLock.unlock() }
|
||||
return _task
|
||||
}
|
||||
}
|
||||
|
||||
var initialResponseTime: CFAbsoluteTime?
|
||||
var credential: URLCredential?
|
||||
var metrics: AnyObject? // URLSessionTaskMetrics
|
||||
|
||||
private var _task: URLSessionTask? {
|
||||
didSet { reset() }
|
||||
}
|
||||
|
||||
private let taskLock = NSLock()
|
||||
|
||||
// MARK: Lifecycle
|
||||
|
||||
init(task: URLSessionTask?) {
|
||||
self.task = task
|
||||
_task = task
|
||||
|
||||
self.queue = {
|
||||
let operationQueue = OperationQueue()
|
||||
|
Reference in New Issue
Block a user