Skip to content
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

Enforce Native Navigator creation on main thread #3467

Closed
S2Ler opened this issue Oct 12, 2021 · 0 comments · Fixed by #3471
Closed

Enforce Native Navigator creation on main thread #3467

S2Ler opened this issue Oct 12, 2021 · 0 comments · Fixed by #3471
Assignees
Labels
Core Work related to core navigation and integrations. v2.x Related to version 2.x. workaround available
Milestone

Comments

@S2Ler
Copy link
Contributor

S2Ler commented Oct 12, 2021

NavNative Navigator calls callbacks on the thread that created it. It is most likely to be the main thread, but not guaranteed at the moment. There are several possible fixes 1 but the most flexible would be enforcing the creation of NavNative navigator on the main thread.

The best place to do this is in NativeHandlersFactory.

Footnotes

  1. https://github.com/mapbox/mapbox-navigation-ios/pull/3432#discussion_r722127001

@S2Ler S2Ler added Core Work related to core navigation and integrations. v2.x Related to version 2.x. workaround available labels Oct 12, 2021
@S2Ler S2Ler added this to the v2.0 milestone Oct 12, 2021
@S2Ler S2Ler self-assigned this Oct 12, 2021
S2Ler added a commit that referenced this issue Oct 13, 2021
At the moment, Nav SDK does most of the work on the main thread and we
need to make sure that callbacks are either called on the main thread or
scheduled to the main thread.

Fixes #3467
S2Ler added a commit that referenced this issue Oct 14, 2021
…3471)

At the moment, Nav SDK does most of the work on the main thread and we
need to make sure that callbacks are either called on the main thread or
scheduled to the main thread.

Fixes #3467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Work related to core navigation and integrations. v2.x Related to version 2.x. workaround available
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant