Repository navigation
Fix throttle demand buffering and emission scheduling - #28
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
- Coverage 96.32% 96.32% -0.01%
==========================================
Files 108 108
Lines 8080 8100 +20
==========================================
+ Hits 7783 7802 +19
- Misses 297 298 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for merging this! Will a version be tagged? |
Member
Author
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.
Throttledrops input received without downstream demand and consumes demand before scheduled output runs. With.max(1)andlatest: true, a burst of1, 2, 3therefore emits1instead of Apple's3.Use one pending input, a separate scheduling flag, and the next emission time. Consume demand at delivery, schedule buffered input when demand arrives, and select the first input of each window when
latestis false. Also match Combine's subscription delivery order, scheduled closure lifetime, completion handling, and buffer cleanup on cancellation.Add 13 regression tests for demand exhaustion, pending output, window boundaries, reentrant input, optional input, completion, and object lifetime. The state transitions were checked in the local iOS 17 simulator binary, and all regression tests were run against Apple Combine on macOS 26.6.2.
Handle both absolute file URLs and relative paths in SwiftLint baselines, including macOS temporary-directory aliases. This preserves filtering of existing violations with SwiftLint 0.65.0 and 0.65.1.
Validation with Swift 6.3.3:
-warnings-as-errors.bash utils/lint.sh origin/main: 0 violations with SwiftLint 0.65.0 and 0.65.1, including temporary-directory aliases and paths with spaces.Fixes #29.
Related to #25.