Skip to content

Commit 75cbccc

Browse files
authored
Merge pull request #227 from fsprojects/prefer-dispose-over-asyncdispose
Prefer `IDisposable` over `IAsyncDisposable` for disposing `ReaderWriterLock`
2 parents 1d0c637 + a2f20bd commit 75cbccc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/FSharp.Control.TaskSeq/TaskSeqInternal.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -978,13 +978,11 @@ module internal TaskSeqInternal =
978978
go <- step
979979
}
980980

981-
interface IAsyncDisposable with
982-
override _.DisposeAsync() =
981+
interface IDisposable with
982+
override _.Dispose() =
983983
if not (isNull _rwLock) then
984984
_rwLock.Dispose()
985985

986-
ValueTask.CompletedTask
987-
988986
let except itemsToExclude (source: TaskSeq<_>) =
989987
checkNonNull (nameof source) source
990988
checkNonNull (nameof itemsToExclude) itemsToExclude

0 commit comments

Comments
 (0)