浏览代码

Adding a comment on granting cancellation in iterators.

Bart De Smet 7 年之前
父节点
当前提交
17b3142869
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs

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

@@ -30,6 +30,9 @@ namespace System.Linq
             enumerator._state = AsyncIteratorState.Allocated;
             enumerator._state = AsyncIteratorState.Allocated;
             enumerator._cancellationToken = cancellationToken;
             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;
             return enumerator;
         }
         }