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

Fix background threading for IOS #54

Closed
sweiss435 opened this issue Jun 29, 2022 · 0 comments
Closed

Fix background threading for IOS #54

sweiss435 opened this issue Jun 29, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@sweiss435
Copy link

PeerConnection disconnects when IOS goes to background if I create peer connection on main scope. However, if I try and use GlobalScope, when I do:
val config = RtcConfiguration()
I get:
Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
kotlin.native.IncorrectDereferenceException: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread
I believe you need to add @ThreadImmutable like:
https://github.com/realm/realm-kotlin/pull/822/files
to values in classes like RtcConfiguration like
@ThreadImmutable
val js: Json

@shepeliev shepeliev added the bug Something isn't working label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants