I have on my code a heavy algorithm in a function in node.js.
I want to called this function on a other thread to save performances. I have tried :
let ChildProcess = require('child_process');
const thread1 = ChildProcess.spawn(function ()
{
reloadData();
});
function reloadData() { /* code */ }
But it don't working. I want to called this function on the current .js file, not in a other .js file Thank you !