 }
 
 
-private class Lock {
+private class Mutex {
     private var mutex = pthread_mutex_t()
 
     init() {

        if let value = value {
            f(value)
        }
        lock.sync {
            callbacks.append(f)
        }
        return self

        pthread_mutex_destroy(&mutex)
    }

    func lock() -> Int32 {
        return pthread_mutex_lock(&mutex)
    }

    func unlock() -> Int32 {
        return pthread_mutex_unlock(&mutex)
    }

    func lock(@noescape closure: () -> Void) {
        let status = lock()
        assert(status == 0, "pthread_mutex_lock: \(strerror(status))")
        defer { unlock() }
        closure()
    }
}
