-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[ST-NNNN] Polling Confirmations #2926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[ST-NNNN] Polling Confirmations #2926
Conversation
c602e5f to
4fafc61
Compare
|
Looks like there's some merge or rebase issue, files besides the new proposal are being shown as modified |
93f586d to
3fcb851
Compare
Whoops. That's corrected now. I wonder how I messed up that rebase. |
…to evaluate the expression after it passes
I'm working on it, but macros are hard.
- Change the default timeout. - Change how unexpected thrown errors are treated. - Add future direction to add change monitoring via Observation - Add alternative considered of Just Use A While Loop - Add alternative considered for shorter default timeouts
- Include commenting on why not pure counts (i.e. why counts + interval) - Specify the configuration traits - Specify callsite configuration of counts + interval
… do not have a configurable clock
…n on when polling should not be used.
Co-authored-by: Jonathan Grynspan <[email protected]>
…t to mention that duration may be greater than or equal to interval
Minor grammar improvements
3fcb851 to
3ab257e
Compare
| until stopCondition: PollingStopCondition, | ||
| within duration: Duration? = nil, | ||
| pollingEvery interval: Duration? = nil, | ||
| isolation: isolated (any Actor)? = #isolation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer expressing this by making the function “nonisolated(nonsending)”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I clearly missed the SE proposal that changed this.
| pollingEvery interval: Duration? = nil, | ||
| isolation: isolated (any Actor)? = #isolation, | ||
| sourceLocation: SourceLocation = #_sourceLocation, | ||
| _ body: @escaping () async throws -> Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be nonisolated nonsending as well?
New proposal for Swift Testing: Polling Confirmations.
These allow test authors to check that state updates over the course of some amount of time, in a very brute-force kind of way. Very helpful when there aren't other means of checking this available.