private static async Task CompleteAsync(string name, IJob job, Task task) { task = job.DoAsync(); poolOfTasks.TryAdd(name, task); await task; poolOfTasks.TryRemove(name, out var item); }