   }
 }
 
-func makeLocking(isFair: Bool = false) -> Locking {
+public func makeLocking(isFair: Bool = false) -> Locking {
   #if os(Linux)
     return DispatchSemaphore(value: 1)
   #else

}

extension DispatchSemaphore: Locking {
  func lock() {
    self.wait()
  }

  func unlock() {
    self.signal()
  }
}


import Dispatch

public protocol Locking {
  mutating func lock()
  mutating func unlock()
}

public extension Locking {
  mutating func locker<T>(_ locked: () throws -> T) rethrows -> T {
    lock()
    defer { unlock() }
