joltup / react-native-threads

Create new JS processes for CPU intensive work
MIT License
755 stars 141 forks source link

[Android] Support React Native v0.60 #76

Closed jhen0409 closed 5 years ago

jhen0409 commented 5 years ago
jhen0409 commented 5 years ago

/cc @Traviskn

Traviskn commented 5 years ago

Thanks for the PR, we'll test this out soon 👍

jhen0409 commented 5 years ago

An issue is the host sometimes doesn't not received ThreadSelfManager.postMessage with hermes -emit-binary for worker bundle, I've to use setTimeout(() => ThreadSelfManager.postMessage('init'), 100) to solve issue.

I think the reason is the Hermes compiler speeds up the startup time of worker, it may faster than the preparation of thread bridge.

gaodeng commented 5 years ago

any news on this?

biduone commented 5 years ago

@jhen0409 I use react-native0.60.3, the PackageList is auto generate by react-native. The RNThreadPackage.java constructor need incoming parameter ReactNativeHost, but in PackageList no put the parameter into.

neller1 commented 5 years ago

@jhen0409 I use react-native0.60.3, the PackageList is auto generate by react-native. The RNThreadPackage.java constructor need incoming parameter ReactNativeHost, but in PackageList no put the parameter into.

The same issue

jhen0409 commented 5 years ago

@biduone @neller1, if you're used autolinking, you should disable it for react-native-threads and link it manually. You can read the doc: How can I disable autolinking for unsupported library?

neller1 commented 5 years ago

Thank you for your answer, but after switching to manual link I have the same error ( Can you write me in skype (alex.stacheev)? Thank you!!! -- Frady