public void AssetIntoFile(OMV.UUID getID, OMV.AssetType type, string filename, AssetFetcherCompletionCallback doneCall) { m_totalRequests.Event(); if (File.Exists(filename)) { m_requestsForExisting.Event(); // doneCall.BeginInvoke(getID, filename, null, null); ThreadPool.QueueUserWorkItem((WaitCallback) delegate(Object x) { // ThreadPool.UnsafeQueueUserWorkItem((WaitCallback)delegate(Object x) { doneCall(getID, filename); }, null); } lock (m_requests) { if (!m_requests.ContainsKey(filename)) { TRequest treq = new TRequest(); treq.ID = getID; treq.Filename = filename; treq.Type = type; treq.DoneCall = doneCall; treq.QueueTime = System.Environment.TickCount; m_requests.Add(filename, treq); } else { m_duplicateRequests.Event(); } } PushRequests(); }