Skip to content

Commit 102e5fe

Browse files
Mpdreamzrusscam
authored andcommitted
backport configure await on bulkall awaits
1 parent 9c12cd3 commit 102e5fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Nest/Document/Multiple/BulkAll/BulkAllObservable.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private async Task<IBulkAllResponse> BulkAsync(IList<T> buffer, long page, int b
119119

120120

121121
return s;
122-
});
122+
}).ConfigureAwait(false);
123123

124124
this._compositeCancelToken.ThrowIfCancellationRequested();
125125
if (!response.IsValid && backOffRetries < this._backOffRetries)
@@ -132,7 +132,7 @@ private async Task<IBulkAllResponse> BulkAsync(IList<T> buffer, long page, int b
132132
.Select(x => x.d)
133133
.ToList();
134134

135-
return await this.BulkAsync(retryDocuments, page, ++backOffRetries);
135+
return await this.BulkAsync(retryDocuments, page, ++backOffRetries).ConfigureAwait(false);
136136
}
137137
else if (!response.IsValid)
138138
{
@@ -198,10 +198,10 @@ private async Task ProcessAsync<TSource, TResult>(
198198
SemaphoreSlim semaphoreSlim,
199199
long page)
200200
{
201-
if (semaphoreSlim != null) await semaphoreSlim.WaitAsync();
201+
if (semaphoreSlim != null) await semaphoreSlim.WaitAsync().ConfigureAwait(false);
202202
try
203203
{
204-
var result = await taskSelector(item, page);
204+
var result = await taskSelector(item, page).ConfigureAwait(false);
205205
resultProcessor(item, result);
206206
}
207207
catch

0 commit comments

Comments
 (0)