"Passing a CancellationToken to async iteration"

await foreach (var i in someAsyncEnumerable.WithCancellation(someToken)) {
	/* ... */
}


Code snippet taken from "Two Decades of C#: A Reference - C# 8".