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

Implement proper structured cloning between Workers #3557

Closed
kevinkassimo opened this issue Dec 29, 2019 · 2 comments · Fixed by #9323
Closed

Implement proper structured cloning between Workers #3557

kevinkassimo opened this issue Dec 29, 2019 · 2 comments · Fixed by #9323
Labels
cli related to cli/ dir deno_core Changes in "deno_core" crate are needed web related to Web APIs
Milestone

Comments

@kevinkassimo
Copy link
Contributor

This is actually #3317, but we need a clearer issue name for tracking purposes.

Structured cloning implementation might be very useful in ways for transferring tasks between Workers for load balancing, through low-cost transfer of ArrayBuffer (or even SharedArrayBuffer). For example, it might allow an HTTP request to move to another vacant thread if it somehow takes heavy CPU time to respond.

@ry
Copy link
Member

ry commented Dec 29, 2019

depends on #3530 (replace libdeno with rusty_v8)

@bartlomieju
Copy link
Member

@ry, @piscisaureus and I discussed this issue at length and decided that structured clone is not gonna make it to 1.0.

We need to update docs accordingly as well as postMessage() method to try and discover if passed value can be JSON-stringified (eg. posting Map will give garbage in parent worker). Also postMessage() should throw is second argument is passed (transfer used to transfer typed arrays between workers).

@bartlomieju bartlomieju added this to the future milestone Mar 12, 2020
@bartlomieju bartlomieju added cli related to cli/ dir deno_core Changes in "deno_core" crate are needed web related to Web APIs labels Nov 18, 2020
@kitsonk kitsonk assigned kitsonk and unassigned bartlomieju Jan 21, 2021
@kitsonk kitsonk modified the milestones: future, 1.8.0 Jan 21, 2021
@kitsonk kitsonk removed their assignment Feb 17, 2021
@lucacasonato lucacasonato removed this from the 1.8.0 milestone Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir deno_core Changes in "deno_core" crate are needed web related to Web APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants