-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Port tests from libDispatch to DispatchAsync. Add additional tests for functionality. #2
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
Conversation
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.
Looks good to me! More tests! 🎉
ae42424
to
a872ad4
Compare
a872ad4
to
ee96d84
Compare
[Human-Directed AI Assistance]
…/tests/dispatch_pingpong.c. [Human-Directed AI Assistance]
# Conflicts: # Tests/DispatchAsyncTests/DispatchGroupTests.swift # Conflicts: # Tests/DispatchAsyncTests/DispatchGroupTests.swift
…And other minor improvements to tests.
ee96d84
to
7331fb6
Compare
let group = DispatchGroup() | ||
await result.append(value: "|🔵\(index)") | ||
let group = DispatchGroup() | ||
await result.append(value: "|🔵\(iteration)") |
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.
Ah, interesting. Compiler error caused by this change. Something in the rebase and merged didn't flag this as a conflict, and interestingly enough the CI didn't run on this PR after re-targeting the stacked PR to main
. Will fix soon, and will check that a normal PR runs the expected checks.
Quick summary
This PR adds a focused round of new and ported tests to harden the experimental
DispatchAsync
package:AsyncSemaphore
andDispatchTimeInterval
cover edge-cases that weren’t exercised before.dispatch_pingpong
anddispatch_group
) rewritten in Swift to stress-test queue/group behaviour under concurrency.DispatchGroup.wait
publicly visible so the new tests compile.PR Dependencies
This branch is stacked on PR #1 – “Initial implementation of many GCD API’s using Swift Concurrency.”
PR #1 will need merged before this PR.