Answer the question
In order to leave comments, you need to log in
How to move the execution of a function to a separate process and return the result?
I am writing an application in Electron. In it, a function is called doWithArray ()
that converts a multidimensional array. The problem is that often this array is huge. And it takes a long time to process. And for the duration of the processing, the application interface does not respond.
Is it possible to execute this function in a separate process so that the interface is not "frozen" and then return the result to the parent?
Answer the question
In order to leave comments, you need to log in
Something like this.
let promise = new Promise((resolve, reject) => {
doWithArray(...)
resolve(...)
}).then(...).catch(...)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question