Skip to content

Instantly share code, notes, and snippets.

View ramunasjurgilas's full-sized avatar

Ramūnas ramunasjurgilas

View GitHub Profile
@lattner
lattner / TaskConcurrencyManifesto.md
Last active April 18, 2024 09:44
Swift Concurrency Manifesto
@Sorix
Sorix / AsynchronousOperation.swift
Last active June 15, 2023 10:50
Subclass of NSOperation (Operation) to make it asynchronous in Swift 3, 4, 5
// Created by Vasily Ulianov on 09.02.17, updated in 2019.
// License: MIT
import Foundation
/// Subclass of `Operation` that adds support of asynchronous operations.
/// 1. Call `super.main()` when override `main` method.
/// 2. When operation is finished or cancelled set `state = .finished` or `finish()`
open class AsynchronousOperation: Operation {
public override var isAsynchronous: Bool {