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

feat: MessageChannel and MessagePort #11051

Merged
merged 7 commits into from
Jun 21, 2021

Conversation

lucacasonato
Copy link
Member

@lucacasonato lucacasonato commented Jun 19, 2021

This commit introduces support for MessageChannel and MessagePort.
MessagePorts can be transfered across a message channel.

This PR does not support transfering ports between workers yet. I will
tackle moving over workers, and broadcast channel to use the same
transfer logic used here in a follow up.

Closes #6691

This commit introduces support for MessageChannel and MessagePort.
MessagePorts can be transfered across a message channel.
@lucacasonato lucacasonato changed the title WIP: feat MessageChannel and MessagePort feat: MessageChannel and MessagePort Jun 21, 2021
@lucacasonato lucacasonato added this to the 1.12.0 milestone Jun 21, 2021
@lucacasonato lucacasonato requested a review from bartlomieju June 21, 2021 14:35
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cleanly implemented. It's unfortunate that ports and channels will leak in tests unless you close them explicitly, but that's already a case for some other Web APIs.

Let me know if you need help integrating into workers.

@lucacasonato lucacasonato merged commit f9ff981 into denoland:main Jun 21, 2021
@lucacasonato lucacasonato deleted the message_channel branch June 21, 2021 17:53
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

Successfully merging this pull request may close these issues.

Worker MessageChannel
2 participants