Skip to content

Conversation

@abelonogov-ld
Copy link
Contributor

@abelonogov-ld abelonogov-ld commented Jan 9, 2026

Requirements

Put completions of all public methods into main-thread.

  1. Solves inconsistency of completion on unexpected threads. (before some was on main and some not)
  2. Solves Obj-C compatibility
  3. Solves using library from Swift6 project

Related issues

(#419)

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Require customers wrap completions into sendable completions. T


Note

Standardizes completion threading across the public API to always invoke on the main thread.

  • setOnline(_:completion:): wraps DispatchGroup.notify to hop to DispatchQueue.main before calling completion
  • identify(...): introduces _identifyMain that dispatches result to main; all identify overloads now route through it (including deprecated variant)
  • start(config:context:completion:) and start(config:context:startWaitSeconds:completion:): wrap provided completions to execute on main
  • Minor refactor: replace direct _identifyHooked calls with _identifyMain in public paths; internal behavior unchanged

Written by Cursor Bugbot for commit 9390055. This will update automatically on new commits. Configure here.

@abelonogov-ld abelonogov-ld requested a review from a team as a code owner January 9, 2026 05:47
completion()
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an existing customer is doing an operation that requires a non-ui thread in the completion, could this be considered a breaking change?

For example: an existing customer does a network operation or database operation in the completion. If they adopt this update in a minor version, it would introduce a bug for them.

Is it possible that for v10 we add an optional param for the callback dispatch queue?

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.

3 participants