[swift-corelibs-dev] Asynchronous Operations

Brent Royal-Gordon brent at architechies.com
Sat Jan 21 08:09:08 CST 2017

> On Jan 20, 2017, at 7:55 AM, Ian Partridge via swift-corelibs-dev <swift-corelibs-dev at 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 {

I believe that would make existing code just work without needing to do anything special.

Brent Royal-Gordon

More information about the swift-corelibs-dev mailing list