Wait for several web workers to finish
问题 I have a script that creates several webworkers, these webworkers perform some work and send a message when they finish. The problem is I need to get the result from all of them and then compute a final solution. In other works, they work out a partial solution of the problem and the main thread uses those partial solutions to generate the final answer. How could I wait for all those threads to finish, is there something in Javascript like invokeAll in Java? More or less, what I have in my