         return requestList[key]
     }
     
+    private func internalListRequest<T: Hashable>(requestKeyType:T.Type, onlyFirst: Bool) -> Set<UInt64>? {
+        mutex.lock()
+        defer { mutex.unlock() }
+        
+        var ids = Set<UInt64>()
+        
+        for (requestKey, requestIds) in requestList {
+            if requestKey.base is T {
+                if onlyFirst {
+                    return requestIds
+                } else {
+                    ids.formUnion(requestIds)
+                }
+            }
+        }
+        
+        return ids.isEmpty ? nil : ids
+    }
+    
+    private func internalCancelRequests(ids: Set<UInt64>) {
+        for requestId in ids {
+            if let engine = mutex.synchronized({ self.requestUseEngines[requestId] }) {
+                
+                //Cancel in queue
+                if let queue = engine.queueForRequest {
+                    queue.async {
+                        engine.cancelRequest(requestId: requestId)
+                    }
+                } else {
+                    //Or in current thread
+                    engine.cancelRequest(requestId: requestId)
+                }
+            }
+        }
+    }
     
     private struct EmptyKey: Hashable {
         var hashValue: Int { return 0 }

    }
    
    /**
     Cancel all requests with equal this request.
     
     Signal cancel send to engine, but real canceled implementation in engine.

    private let engines:[WebServiceEngining]
    private let storages:[WebServiceStoraging]
    
    private var requestList: [AnyHashable: Set<UInt64>] = [:]
    private var requestUseEngines: [UInt64: WebServiceEngining] = [:]
    
    
    
