void TaskCallback(ChunkTaskRequest request, ChunkTask task)
        {
            request.Clear();
            requestPool.Return(request);

            lock (activeRequests)
            {
                activeRequests.Remove(request);
            }
        }
        public void RegisterTask(ChunkTaskType taskType, ChunkTask task)
        {
            if (task == null)
            {
                throw new ArgumentNullException("task");
            }

            task.Initialize(this, taskCallbackMethod);
            tasks[taskType] = task;
        }