ios-client-sdk icon indicating copy to clipboard operation
ios-client-sdk copied to clipboard

feat: DO NOT REVIEW CI TEST : not multithread safe access to cancel var

Open abelonogov-ld opened this issue 4 months ago • 0 comments

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 TimeoutExecutor to manage async operations with timeouts and refactor LDClient.identify and LDClient.start to use it; add unit tests.

  • Core:
    • Utility: Add ServiceObjects/TimeoutExecutor.swift to run async operations with a timeout, ensuring single completion on a specified DispatchQueue.
    • LDClient:
      • Refactor identify(context:timeout:useCache:completion:) to use TimeoutExecutor instead of manual cancel flags.
      • Refactor timed-start path start(..., startWaitSeconds:, ...) to use TimeoutExecutor for timeout handling.
  • Tests:
    • Add LaunchDarklyTests/ServiceObjects/TimeoutExecutorSpec.swift covering 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.

abelonogov-ld avatar Oct 15 '25 16:10 abelonogov-ld