GoogleChromeLabs / GoogleChromeLabs/comlink

Re-proxying across threads

Open
#671 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12.8k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

Let's say we have the main thread A and the web worker B which is spawned by A and the web worker C which is spawned by B. Now we create a callback function within C that we want to attach to some event in A. In C we proxy the callback function as follows: `const proxyListener = Comlink.proxy(listener);` and then pass the proxy to B. Is it necessary to re-proxy the proxy from C in B to A? I tested it and it works without re-proxying but I don't know if this is the right way of doing it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.