From 8e12c7fa48cea37f288909fc87375ca17053c624 Mon Sep 17 00:00:00 2001 From: Daniel Ericsson Date: Sat, 5 Jun 2021 07:37:12 +0200 Subject: [PATCH] Make recursive locks the default --- Flow/Locking.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow/Locking.swift b/Flow/Locking.swift index 3cce65f..5e06ef1 100644 --- a/Flow/Locking.swift +++ b/Flow/Locking.swift @@ -85,7 +85,7 @@ typealias PThreadMutex = UnsafeMutablePointer /// - Note: You have to explicity call `initialize()` before use (typically in a class init) and `deinitialize()` when done (typically in a class deinit) extension UnsafeMutablePointer where Pointee == pthread_mutex_t { - func initialize(as type: MutexType = .normal) { + func initialize(as type: MutexType = .recursive) { var attr = pthread_mutexattr_t() defer { pthread_mutexattr_destroy(&attr) } guard pthread_mutexattr_init(&attr) == 0 else {