I have this piece of code (in synchronous method):

```cs
// ...
var processingTasks = Enumerable.Range(0, count)
    .Select(x => Task.Run(async () =>    
      await CallApiAndUpdateSthAsync(accounts[x], cancellationToken)))
    .ToList();

var processingTasksAggregate = Task.WhenAll(processingTasks);

Task.WaitAny(globalStatusMonitoringTask, processingTasksAggregate);

```

I am especially interested in this part:

```cs
Task.Run(async () => await CallApiAndUpdateSthAsync(accounts[x], cancellationToken))

```

Would it make a difference (from a possible deadlock perspective) if I removed the `Task.Run`? I.e. changed it to:

```cs
CallApiAndUpdateSthAsync(accounts[x], cancellationToken)

```

I wanted to remove it, because queueing the task on a thread pool (via `Task.Run`) seemed redundant, but my colleague advised me no to, because of possible deadlocks

The whole method is run as background job in sth similar to Hangfire:

[![hangfire-like-jobs-processor](https://i.stack.imgur.com/OD8F8.png)](https://i.stack.imgur.com/OD8F8.png)

[Edit 1]: **It's a .NET Framework** (not Core) application.