-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: transfer from worker fixed #455
Conversation
Thanks for debugging and fixing this issue Leonid. Can you add a unit test too, to prevent future regressions? |
Hi @josdejong Again, if there is a way to do unit tests in browser env, I would be more than happy to (learn the way to do and) to implement the test ! But for now, we're clueless with @LeonidPolukhin ... |
Ok makes sense. Let's not try to write an automated test then. Do you have a minimal browser example that I can test manually to verify the solution? |
I could add one more example in, for instance, examples/webpack5 or extend the existing one. Which variant would you prefer? |
I'll check with @LeonidPolukhin I saw there is an example with webpack5 ( |
Extended the example in webpack 5. Worker creates an array of the requested size and transfers it back to the main thread using workerEmit. After that it returns boolean value indicating whether the array buffer is detached. With the current version of workerpool the example shows that arrays are cloned but with the fix applied they are transferred. |
Thanks, I tried it out and indeed it works like expected 👍 |
The fix is published now in |
No description provided.