     }
     
     private static var dependencies = [Key: Dependency]()
+    private static let queue = dispatch_queue_create(nil, DISPATCH_QUEUE_CONCURRENT)
     
     private init() {}
     

                unregister(key)
            }
        }
        return (dependency.resolve(parameter, lifecycle: lifecycle) as D)
    }
    
    /**

     */
    public static func register<P, D>(type type: String = String(reflecting: D.self), name: String? = nil, container: String? = nil, lifecycle: Lifecycle = .NotCached, eval: P -> D) -> Any {
        let key = Key(type: type, name: name, container: container)
        dispatch_barrier_async(queue) {
            dependencies[key] = Dependency(lifecycle: lifecycle, eval: eval)
        }
        return key
    }
    
