This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AsyncOperation: Operation { | |
@objc enum State: Int { | |
case ready | |
case executing | |
case finished | |
} | |
private let stateQueue = DispatchQueue(label: "\(Bundle.main.bundleIdentifier!).AsyncOperation.state", attributes: .concurrent) | |
private var _state: State = .ready |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
protocol Item: Codable { | |
static var type: ItemType { get } | |
var commonProtocolString: String { get } | |
} | |
enum ItemType: String, Codable { | |