joltup/react-native-threads

Android App Crash

aqdas-ilyas opened this issue · 0 comments

"react-native": "0.67.4", "react-native-threads": "^0.0.19",

image

data get from the server in 2-second intervals. the app crashed when it creates the thread see the above image

` const thread = new Thread('./BMS100.thread.js');

    thread.postMessage('split');
    // thread.onmessage = (message) => console.log(message);
    console.log('Termainateeeeeeee')
    thread.terminate();`

BMS100.thread.js file

import { self } from 'react-native-threads'; console.log('Fileeeeeeeee') self.onmessage = (message) => { console.log('@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@', message) alert(message) } self.postMessage('hello')