joltup / react-native-threads

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

Threads pause when main application goes to background or screen is locked #64

Open SahilRS200 opened 5 years ago

SahilRS200 commented 5 years ago

Hi,

I am testing this library with a simple functionality where this thread would connect to a websocket server and send a message every 6 seconds through a timer, or relay whatever string is sent through worker.postmessage call.

However, the threads stop pinging to websockets if i lock the screen or navigate away from the RN app.

This is my primary requirement - to be able to use a few of these worker threads to do some background work irrespective of RN app being on focus or not

Traviskn commented 5 years ago

react-native-threads do not continue to run if your app is paused or put into the background - unfortunately the library does not meet your requirement