Kudo / react-native-v8

Opt-in V8 runtime for React Native Android
MIT License
914 stars 69 forks source link

alternative solution for pumping v8 message loop #141

Closed Kudo closed 1 year ago

Kudo commented 1 year ago

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