Description
The multi-methods which depend upon Parallel.ForEach require specific tuning depending upon the hardware they are run on to get decent performance, are easy to use incorrectly, and Parallel.ForEach are better suited for compute-bound operations instead of IO-bound operations.
We suggest that users use the async multi/bulk methods instead:
public void async GetKeys(List<string> keys) |
{
|
var tasks = new List<Task<IOperationResult>>(); |
foreach(var key in keys)
|
{
|
tasks.Add(bucket.GetAsync(key));
|
}
|
var results = await Task.WhenAll(tasks);
|
|
// do something with the results |
}
|