Skip to content

Commit

Permalink
Mild refactoring of taskseqinternal
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink authored and abelbraaksma committed Mar 15, 2024
1 parent a56f37c commit 4643566
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/FSharp.Control.TaskSeq/TaskSeqInternal.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4643566

Please sign in to comment.