Hm, that’s probably the least bad option we have at the moment. I don’t want to introduce “new” API, as it is unlikely we will be able to remove it when whatever permanent solution comes up.
- Tony > On Jan 21, 2017, at 6:09 AM, Brent Royal-Gordon via swift-corelibs-dev > <swift-corelibs-dev@swift.org> wrote: > >> On Jan 20, 2017, at 7:55 AM, Ian Partridge via swift-corelibs-dev >> <swift-corelibs-dev@swift.org> wrote: >> >> Is there any way that we could support asynchronous operations in >> swift-corelibs-foundation, in the absence of KVO? > > Could we add `willChangeValue(forKey:)` and `didChangeValue(forKey:)` methods > just to `Operation` which only handle an `isFinished` key? Presumably they'd > just look like: > > public func willChangeValue(forKey key: String) { > // do nothing > } > public func didChangeValue(forKey key: String) { > if key == "isFinished" && isFinished { > finish() > } > } > > I believe that would make existing code just work without needing to do > anything special. > > -- > Brent Royal-Gordon > Architechies > > _______________________________________________ > swift-corelibs-dev mailing list > swift-corelibs-dev@swift.org > https://lists.swift.org/mailman/listinfo/swift-corelibs-dev _______________________________________________ swift-corelibs-dev mailing list swift-corelibs-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-corelibs-dev