Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `rxquery` emitted its elements on the thread pool, out of order and after the source had moved on; `yield` and `zero` are now synchronous
- `rxquery` `sumBy` passed `null` to the `(+)` of reference types
- A positional comparer or element selector passed to the `Async` `toLookup` was silently ignored
- `iterAsync` could fault with `OverflowException` on sources with more than `Int32.MaxValue` elements
- `chunkBy` accepted a non-positive window length of `ChunkTimeSpanCount` and `ChunkMillisecondsCount`, which failed every element
- Misleading XML docs of `catch`

Expand Down
4 changes: 3 additions & 1 deletion src/FSharp.Control.R3/AsyncObservable.fs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ module Observable =
/// by intercepting the message stream to run arbitrary actions for messages on the pipeline.
/// </remarks>
/// <exception cref="T:System.ArgumentOutOfRangeException">Thrown when the concurrency limit of the options is 0 or below -1.</exception>
let iterAsync options (action : 't -> Async<unit>) source = source |> mapAsync options action |> length |> Async.Ignore
let iterAsync options (action : 't -> Async<unit>) source =
// Waits through iter: waiting through length counted the elements with a checked add, which overflows on long-lived sources
source |> mapAsync options action |> iter ignore

[<AutoOpen>]
module Extensions =
Expand Down
4 changes: 2 additions & 2 deletions src/FSharp.Control.R3/TaskObservable.fs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ module Observable =
/// </remarks>
/// <exception cref="T:System.ArgumentOutOfRangeException">Thrown when the concurrency limit of the options is 0 or below -1.</exception>
let iterAsync cancellationToken options (action : CancellationToken -> 't -> Task<unit>) source =
// Waits through iter: waiting through length counted the elements with a checked add, which overflows on long-lived sources
source
|> mapAsync options action
|> length cancellationToken
:> Task
|> iter cancellationToken ignore

[<AutoOpen>]
module Extensions =
Expand Down