GoogleChromeLabs / GoogleChromeLabs/comlink
Q: Should I release proxy()-wrapped callbacks?
Open
- Dominant language
- TypeScript
- Stars
- 12.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
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:
```javascript
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?
Contributor guide
Assessment
This issue has not been assessed yet.