 
 /// An atomic variable.
 public final class Atomic<Value> {
-	private var _mutex: MutexType
+	private var _mutex: Locking
 	private var _value: Value
 	
 	/// Atomically get or set the value of the variable.


import Foundation

internal protocol MutexType: class {
	func lock()
	func unlock()
}

extension RecursiveLock: MutexType {}

final class PosixThreadMutex: MutexType {
	private var _mutex = pthread_mutex_t()

	init() {

	}

	/// Initializes the variable with the given initial value.
	internal init(_ value: Value, mutex: Locking) {
		_value = value
		_mutex = mutex
	}
