Azure / azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
MIT License
723 stars 477 forks source link

ReadManyItemsAsync -> ReadManyTaskHelperAsync wraps forked IO task into Task.Run #4533

Open yar-shukan opened 3 weeks ago

yar-shukan commented 3 weeks ago

Pull Request Template

Description

ReadManyTaskHelperAsync uses Task.Run due to usage of SemaphoreSlim and rate limiting amount of parallel calls. Task.Run uses thread pool and schedules execution to background thread. Optimize solution not to use the thread pool.

Type of change

Please delete options that are not relevant.

Closing issues

To automatically close an issue: closes #4527