Skip to content

Conversation

scottmarchant
Copy link
Collaborator

@scottmarchant scottmarchant commented Jul 9, 2025

Quick summary

This PR adds a focused round of new and ported tests to harden the experimental DispatchAsync package:

  • New unit tests for AsyncSemaphore and DispatchTimeInterval cover edge-cases that weren’t exercised before.
  • Ports of libdispatch reference tests (dispatch_pingpong and dispatch_group) rewritten in Swift to stress-test queue/group behaviour under concurrency.
  • Stability fixes – cleans up a few flaky assertions and makes DispatchGroup.wait publicly visible so the new tests compile.
  • Minor doc tweaks / debug-print housekeeping.

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.

Copy link
Collaborator

@JaapWijnen JaapWijnen left a 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! 🎉

@scottmarchant scottmarchant force-pushed the feat/addAdditionalTests branch from a872ad4 to ee96d84 Compare September 24, 2025 23:04
@scottmarchant scottmarchant force-pushed the feat/addAdditionalTests branch from ee96d84 to 7331fb6 Compare September 30, 2025 14:45
@scottmarchant scottmarchant changed the base branch from feat/swift-wasm-support to main September 30, 2025 15:14
@scottmarchant scottmarchant changed the title feat: Add additional tests for DispatchAsync feat: Port tests from libDispatch to DispatchAsync. Add additional tests for functionality. Sep 30, 2025
@scottmarchant scottmarchant merged commit b5f34e8 into main Sep 30, 2025
@scottmarchant scottmarchant deleted the feat/addAdditionalTests branch September 30, 2025 16:27
let group = DispatchGroup()
await result.append(value: "|🔵\(index)")
let group = DispatchGroup()
await result.append(value: "|🔵\(iteration)")
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants