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

Port streams #10020

Open
dead-claudia opened this issue Dec 25, 2023 · 0 comments
Open

Port streams #10020

dead-claudia opened this issue Dec 25, 2023 · 0 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@dead-claudia
Copy link

What problem are you trying to solve?

Simpler web worker instantiation and messaging that fits better in a Promise-driven world

What solutions exist today?

Nor sure of any. Just new Promise boilerplate as far as I can tell.

How would you solve it?

  • worker.readable, port.readable, workerGlobal.readable: Readable streams that emit received messages. Closes upon worker close.
  • worker.writable, port.writable, workerGlobal.writable: Writable streams that send written messages. Closing terminates the worker
  • window.requestTransfer(object): Marks an object as to be transferred. When StructuredSerializeWithTransfer visits it, it's added to the transfer array dynamically, and StructuredDeserializeWithTransfer puts the transferred object in its place at the given path.

Anything else?

No response

@dead-claudia dead-claudia added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

1 participant