Skip to content

Instantly share code, notes, and snippets.

View nicolaslauquin's full-sized avatar

Nicolas Lauquin nicolaslauquin

  • Sofia
  • Nantes
View GitHub Profile
@V8tr
V8tr / AtomicProperty.swift
Last active July 16, 2018 08:02
Atomic property in Swift using Locks. See blog post for more details: http://www.vadimbulavin.com/atomic-properties/
import Foundation
// MARK: - Locks
protocol Lock {
func lock()
func unlock()
}
extension NSLock: Lock {}