Skip to content

Commit

Permalink
Corrected async -> sync execution.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanyliv committed Sep 15, 2021
1 parent 6cda611 commit 109e613
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ IEnumerator IEnumerable.GetEnumerator()
/// <returns>Query result as <see cref="IAsyncEnumerable{T}"/>.</returns>
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken)
{
return QueryProvider.ExecuteAsyncEnumerable<T>(Expression, cancellationToken).Result.GetAsyncEnumerator(cancellationToken);
return Task.Run(() => QueryProvider.ExecuteAsyncEnumerable<T>(Expression, cancellationToken),
cancellationToken).Result.GetAsyncEnumerator(cancellationToken);
}

/// <summary>
Expand Down

0 comments on commit 109e613

Please sign in to comment.