Skip to content

Commit

Permalink
Make recursive locks the default
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaliz committed Jun 5, 2021
1 parent f32c157 commit 8e12c7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Flow/Locking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ typealias PThreadMutex = UnsafeMutablePointer<pthread_mutex_t>
/// - 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 {
Expand Down

0 comments on commit 8e12c7f

Please sign in to comment.