Skip to content
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

Use Transferable to avoid copying #3

Open
wmertens opened this issue Oct 3, 2015 · 0 comments
Open

Use Transferable to avoid copying #3

wmertens opened this issue Oct 3, 2015 · 0 comments

Comments

@wmertens
Copy link

wmertens commented Oct 3, 2015

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)

Since this is meant for message passing, it should be ok that the sender no longer has the message after sending.

However, if using this for flux/redux (the whole store layer runs in a webworker), that means that the state object(s) need to be copied because the view layer needs to read it, and the actions also need acces to the state. Therefore transferable use should be optional per message…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant