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

Enable value transfers in shared worker messages #2733

Open
novemberborn opened this issue Apr 6, 2021 · 2 comments
Open

Enable value transfers in shared worker messages #2733

novemberborn opened this issue Apr 6, 2021 · 2 comments

Comments

@novemberborn
Copy link
Member

From #2705, when publishing shared worker messages, or replying to an individual message, we should enable values to be transferred.

I don't think a second "transfer list" API is a good fit for the shared worker API. Perhaps we could add a chaining API like .transferring(buffer1, messagePort2).publish({buffer1, messagePort2}) and .transferring(buffer1, messagePort2).reply({buffer1, messagePort2}).

Values can only be transferred once. This also means we can't add this to the .broadcast() method.

See:

reply: (data: Data) => PublishedMessage<Data>;

publish: (data: Data) => PublishedMessage<Data>;

@novemberborn
Copy link
Member Author

@dnlup let me know if you're still interested in working on this 😄

@dnlup
Copy link
Contributor

dnlup commented Apr 7, 2021

It is a nice challenge, but I am a little swamped atm. I hope to be able to get at it soon.

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

No branches or pull requests

2 participants