GoogleChromeLabs / GoogleChromeLabs/comlink
Re-proxying across threads
Open
- 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
Assessment
This issue has not been assessed yet.