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

alternative solution for pumping v8 message loop #141

Merged
merged 1 commit into from
Sep 13, 2022
Merged

Conversation

Kudo
Copy link
Owner

@Kudo Kudo commented Sep 13, 2022

Why

originally, we pump v8 message loop by requestIdleCallback provided by react-native. this will block detox testing because detox detects the app idle state by the internal queue shared with the requestIdleCallback. then detox testing will hang.

How

use the android Looper.getMainLooper().getQueue().addIdleHandler() to listen when main runloop is idle and call the c++ code through the native module and runtime executor.

Test Plan

  • ci passed
  • test compatibility with reanimated
  • test compatibility with detox

@Kudo Kudo marked this pull request as ready for review September 13, 2022 11:41
@Kudo Kudo merged commit c44bf3b into main Sep 13, 2022
@Kudo Kudo deleted the new-main-loop-idle branch September 13, 2022 11:42
Kudo added a commit that referenced this pull request Sep 26, 2022
# Why

fix #144

# How

regression from #141 where it introduces _libruntimeexecutor.so_ links but does not exclude it from gradle. that would cause build errors on linux.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant