Conversation
…consumption requirement Adds FS9999 warning to both groupBy and groupByAsync to alert callers that the resulting sequence must be consumed with a parallel combinator (e.g. AsyncSeq.mapAsyncParallel) to avoid deadlocks. Closes #125 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
approved these changes
Feb 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Repo Assist here — I'm an automated AI assistant for this repository.
Implements dsyme's request to add a
[(CompilerMessage)]warning togroupByandgroupByAsync.What changed
Both
groupByandgroupByAsyncnow emit anFS9999compiler warning at every call site:The warning is added to both the
.fs(implementation) and.fsi(signature) files so it fires regardless of how the module is referenced.To suppress the warning in code that correctly consumes the result in parallel, callers can use
#nowarn "9999"locally.Root cause
groupBy/groupByAsynccreate sub-sequences whose completion is interdependent — the outer sequence must advance to let each sub-sequence complete. Sequential consumption (e.g. withmapAsync) blocks waiting for a sub-sequence to finish while the sub-sequence waits for the outer sequence to advance, causing a deadlock. Previously this was only documented in the XML doc comment, which many users miss.Test Status
✅ Build succeeded
⚠️ Fable tests: 9 pre-existing build errors in the Fable test project (from v4 migration on main); unrelated to this change
✅ 189/190 tests pass — 1 pre-existing flaky timing failure (
bufferByTimeAndCount) unrelated to this change