feat: DO NOT REVIEW CI TEST : not multithread safe access to cancel var
Requirements
- [ ] I have added test coverage for new or changed functionality
- [ ] I have followed the repository's pull request submission guidelines
- [ ] I have validated my changes against all supported platform versions
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.
[!NOTE] Introduce
TimeoutExecutorto manage async operations with timeouts and refactorLDClient.identifyandLDClient.startto use it; add unit tests.
- Core:
- Utility: Add
ServiceObjects/TimeoutExecutor.swiftto run async operations with a timeout, ensuring single completion on a specifiedDispatchQueue.- LDClient:
- Refactor
identify(context:timeout:useCache:completion:)to useTimeoutExecutorinstead of manual cancel flags.- Refactor timed-start path
start(..., startWaitSeconds:, ...)to useTimeoutExecutorfor timeout handling.- Tests:
- Add
LaunchDarklyTests/ServiceObjects/TimeoutExecutorSpec.swiftcovering result-before-timeout, timeout fallback, race, specified-queue execution, no-completion behavior, and late-result ignored.- Project:
- Wire new sources and tests into build targets.
Written by Cursor Bugbot for commit 6b46383fcabd6708159c1cfa55ffc47b5b794657. This will update automatically on new commits. Configure here.