diff --git a/src/FSharp.Control.TaskSeq/TaskSeqInternal.fs b/src/FSharp.Control.TaskSeq/TaskSeqInternal.fs index a062acd..ed92a9f 100644 --- a/src/FSharp.Control.TaskSeq/TaskSeqInternal.fs +++ b/src/FSharp.Control.TaskSeq/TaskSeqInternal.fs @@ -86,7 +86,7 @@ module internal TaskSeqInternal = let empty<'T> = { new IAsyncEnumerable<'T> with - member _.GetAsyncEnumerator _ = + member _.GetAsyncEnumerator(_) = { new IAsyncEnumerator<'T> with member _.MoveNextAsync() = ValueTask.False member _.Current = Unchecked.defaultof<'T> @@ -96,7 +96,7 @@ module internal TaskSeqInternal = let singleton (value: 'T) = { new IAsyncEnumerable<'T> with - member _.GetAsyncEnumerator _ = + member _.GetAsyncEnumerator(_) = let mutable status = BeforeAll { new IAsyncEnumerator<'T> with @@ -978,11 +978,13 @@ module internal TaskSeqInternal = go <- step } - interface IDisposable with - override _.Dispose() = + interface IAsyncDisposable with + override _.DisposeAsync() = if not (isNull _rwLock) then _rwLock.Dispose() + ValueTask.CompletedTask + let except itemsToExclude (source: TaskSeq<_>) = checkNonNull (nameof source) source checkNonNull (nameof itemsToExclude) itemsToExclude