     }
     
     public init() {
-        
+
     }
     
     /**

        about the new value.
    */
    public func update(result: Result<T>) {
        #if os(Linux)
        #else
        objc_sync_enter(self)
        defer { objc_sync_exit(self) }
        #endif
        self.value = result
        self.callbacks.forEach{$0(result)}
    }
    
    /**

        return value?.value
    }
}


private class Lock {
    private var mutex = pthread_mutex_t()

    init() {
        pthread_mutex_init(&mutex, nil)
    }

    deinit {
        pthread_mutex_destroy(&mutex)
    }

    func sync(@noescape closure: () -> Void) {
        let status = pthread_mutex_lock(&mutex)
        assert(status == 0, "pthread_mutex_lock: \(strerror(status))")
        defer { pthread_mutex_unlock(&mutex) }
        closure()
    }
}
