joltup / react-native-threads

Create new JS processes for CPU intensive work
MIT License
756 stars 142 forks source link

Multiple threads PROD environment #119

Open devnullpointer opened 4 years ago

devnullpointer commented 4 years ago

M project conatins two seperate folders with multiple workers in each. For example:

<project-root>/workers/group1/worker1.worker.js
<project-root>/workers/group1/worker2.worker.js
<project-root>/workers/group1/worker3.worker.js
....

and

<project-root>/workers/group2/worker1.worker.js
<project-root>/workers/group2/worker2.worker.js
<project-root>/workers/group2/worker3.worker.js
...

Do I need to execute the release command: node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./android/app/src/main/res/ --entry-file index.thread.js --platform android --bundle-output ./android/app/src/main/assets/threads/index.thread.bundle

for each one? for example:

node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./android/app/src/main/res/ --entry-file workers/group1/worker1.worker.js --platform android --bundle-output ./android/app/src/main/assets/threads/worker1.worker.bundle
node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./android/app/src/main/res/ --entry-file workers/group1/worker2.worker.js --platform android --bundle-output ./android/app/src/main/assets/threads/worker2.worker.bundle
node node_modules/react-native/local-cli/cli.js bundle --dev false --assets-dest ./android/app/src/main/res/ --entry-file workers/group1/worker3.worker.js --platform android --bundle-output ./android/app/src/main/assets/threads/worker3.worker.bundle
...