Skip to content

Change approach for Unity main thread retrieval #238

Closed
@semuserable

Description

@semuserable

We have the following line in ApplicationAdapter

public bool IsMainThread => Thread.CurrentThread.ManagedThreadId == 1;

It seems we cant rely on ManagedThreadId == 1, suggested approach https://stackoverflow.com/questions/26452609/find-out-if-im-on-the-unity-thread. From Unity answers https://answers.unity.com/questions/62631/i-wonder-about-thread-id-plz-answer-me.html

Also, should we store this info on IApplication or put it somewhere else?

Metadata

Metadata

Assignees

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