 import Foundation
 
 public class Promise<T> {
-    fileprivate let lock = NSRecursiveLock()
+    private let lock = NSRecursiveLock()
     
     fileprivate var value: T?
-    fileprivate var handlers: [(T) -> ()] = []
+    private var handlers: [(T) -> ()] = []
     
     public init(_ value: T) {
         self.value = value

        }
    }
    
    fileprivate func reserve(_ handler: @escaping (T) -> ()) {
        lock.lock()
        if let value = self.value {
            handler(value)

        executor(resolve)
    }
    
    private func resolve(_ promise: Promise<T>) {
        promise.reserve {
            self.lock.lock()
            if self.value == nil {
