I hereby claim:
- I am dpgao on github.
- I am dpgao (https://keybase.io/dpgao) on keybase.
- I have a public key whose fingerprint is 57D4 23CE 922E 0B6E B380 34A5 EE48 8EDD A59E 1E88
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| final class ImageDownloader { | |
| typealias CompletionHandler = (UIImage?) -> Void | |
| private struct ResponseHandler { | |
| let dataTask: URLSessionDataTask | |
| var completionHandlers: [CompletionHandler] | |
| } | |
| private let lock = NSLock() |
| infix operator !=> { associativity left precedence 125 } | |
| func !=><T>(lhs: T?, @noescape rhs: () -> Void) -> T? { | |
| if let lhs = lhs { return lhs } | |
| rhs() | |
| return nil | |
| } |