I use web workers to calculate a bit of information in my application. And I don't want to kill the application with an increasing number of web workers so I need to limit creating new workers somehow.
My guess was that I could get a number of currently running workers. Is it possible?
Or maybe you can suggest any technique to limit creating of new ones? I was thinking about a global counter, but is it safe to use it with async workers?