Open kurtextrem opened 6 years ago
Each IMageWorker component will now spawn 4 worker threads. As we've removed the worker.terminate
call, will those threads still be active when a componentWillUnMount gets called?
can you run npm run eslint
to see the lint errors and fix those
@nitish24p I fixed the mistakes, sorry for those, I was in a hurry.
There's a big flaw in my current implementation: .onmessage
can only exist once it seems. Which means currently ever new instance of ImageWorker
replaces the callback function.
This means we need something like a Observer pattern.
Edit: I've overlooked, that Workers have the .addEventListener
interface too, so that's not a problem anymore.
Fixes #10