-
Notifications
You must be signed in to change notification settings - Fork 25
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
recording: fix observation on multiple threads in layout/draw is not supported for compose #204
Conversation
…supported for compose
return | ||
} | ||
val semanticsNodes = semanticsOwner.getAllSemanticsNodes(true) | ||
val latch = CountDownLatch(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that this method is only executed when view.isComposeView()
, its fine to do thread jumping since its a requirement for compose anyway.
// await for 1s max | ||
latch.await(1000, TimeUnit.MILLISECONDS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just an arbitrary value since it is a background thread, awaiting time wont block the screen, the time-sensitive is the part within the main thread block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💡 Motivation and Context
Tries to close #203
💚 How did you test it?
Running the sample with compose screen
📝 Checklist