Browse Source

Adding a comment on granting cancellation in iterators.

Bart De Smet 7 năm trước cách đây
mục cha
commit
17b3142869

+ 3 - 0
Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs

@@ -30,6 +30,9 @@ namespace System.Linq
             enumerator._state = AsyncIteratorState.Allocated;
             enumerator._cancellationToken = cancellationToken;
 
+            // REVIEW: If the final interface contains a CancellationToken here, should we check for a cancellation request
+            //         either here or in the first call to MoveNextAsync?
+
             return enumerator;
         }