Skip to content

Instantly share code, notes, and snippets.

View ennioma's full-sized avatar
🎯
Focusing

Ennio Masi ennioma

🎯
Focusing
View GitHub Profile
@MarcoSantarossa
MarcoSantarossa / AsyncOperation.swift
Last active August 2, 2023 13:23
How to write and use an asynchronous operation
import Foundation
class AsyncOperation: Operation {
enum State: String {
case isReady, isExecuting, isFinished
}
override var isAsynchronous: Bool {
return true
}