Skip to content

Don't use SynchronizationContext.Current to detect whether sdk are in the main thread. #215

@BoysheO

Description

@BoysheO

See file WalletConnect.cs line 72.
SDK version=v5.2.1
In fact, our client modifies Unity's default SynchronizationContext to achieve better performance, which is a very common practice in commercial games. Therefore, do not use SynchronizationContext to determine whether the current logic is running on the main thread. A more mature approach is to retrieve the current thread's ID in the Awake function of a MonoBehaviour, and use this to check if other asynchronous contexts are on the main thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions