Conversation
… parallel map Completes the parallel map API matrix: - mapAsyncParallel (ordered, unbounded) - mapAsyncUnorderedParallel (unordered, unbounded) - mapAsyncUnorderedParallelThrottled (unordered, throttled) - mapAsyncParallelThrottled (ordered, throttled) ← NEW Implementation mirrors mapAsyncParallel but adds a SemaphoreSlim to cap the number of in-flight operations at 'parallelism'. Results are emitted in source order. 3 new tests: order preservation, exception propagation, throttle enforcement. 414/414 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/repo-assist Fable CI is failing |
|
✗ Repo Assist encountered failed, see workflow run. |
|
/repo-assist Fable CI is failing |
|
✗ Repo Assist encountered failed, see workflow run. |
|
/repo-assist Fable CI is failing |
|
✓ Repo Assist completed successfully, see workflow run. |
… NU1605 downgrade warning System.Threading.Channels 10.0.6 (resolved via Version="*") requires Microsoft.Bcl.AsyncInterfaces >= 10.0.6, but the project pinned it at 10.0.5. Fable's MSBuildCrackerResolver treats NU1605 (package downgrade) as a fatal error, causing the Fable CI job to fail. Bumping to 10.0.6 resolves the conflict. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
🤖 Repo Assist here. Root cause of Fable CI failure: Fix applied: Bumped Note: this is a pre-existing issue unrelated to the
|
…tled-20260415-b652b2a1157a8dda
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Adds
AsyncSeq.mapAsyncParallelThrottled, completing the parallel map API matrix:mapAsyncParallelmapAsyncUnorderedParallelmapAsyncUnorderedParallelThrottledparallelism)mapAsyncParallelThrottledparallelism) ← NEWMotivation
Users often want ordered results (predictable output order, easy diffing, deterministic logging) but also want to cap resource usage — e.g. limiting HTTP connections, database queries, or expensive computations to N concurrent operations. Previously this required building a custom wrapper around
mapAsyncParallelor using the unordered variant and accepting non-deterministic output order.mapAsyncParallelThrottledfills this gap directly.API
Implementation
The implementation combines the ordering logic of
mapAsyncParallel(child tasks posted in order, awaited in order) with theSemaphoreSlimthrottling frommapAsyncUnorderedParallelThrottled. The semaphore is acquired before starting each task and released when the task completes (success or exception), naturally bounding in-flight work.Changes
src/FSharp.Control.AsyncSeq/AsyncSeq.fs— implementationsrc/FSharp.Control.AsyncSeq/AsyncSeq.fsi— signature with XML-doctests/FSharp.Control.AsyncSeq.Tests/AsyncSeqTests.fs— 3 new tests (order preservation, exception propagation, throttle enforcement)RELEASE_NOTES.md— 4.14.0 entryversion.props— bumped to 4.14.0Test Status
✅ Build: succeeded (0 errors, pre-existing warnings only — NU1605, FS9999)
✅ .NET tests: 414/414 passed (3 new tests for
mapAsyncParallelThrottled)