Open rejhgadellaa opened 2 years ago
The language in the README is a bit confusing because proxies refer to wrapped workers but there's also the proxy() method to wrap callbacks:
proxy()
const worker = Comlink.wrap( new Worker(/* ... */) ); const callback = Comlink.proxy( result => { }); worker.doWorkAndReport( callback );
Should I do callback[ Comlink.releaseProxy ](); when I no longer need the callback?
callback[ Comlink.releaseProxy ]();
Related: https://github.com/GoogleChromeLabs/comlink/issues/630
The language in the README is a bit confusing because proxies refer to wrapped workers but there's also the
proxy()
method to wrap callbacks:Should I do
callback[ Comlink.releaseProxy ]();
when I no longer need the callback?