-
Notifications
You must be signed in to change notification settings - Fork 65
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
Should "unwatch" be a returned function or object? #167
Comments
Maybe... I was hoping that we could avoid allocations like this. I'm not sure if we especially need duplicate watchers. |
Why is a function a worse allocation than an object containing one? |
Right now, |
Worth noting that I do separately have a suggestion of removing APIs like |
Just thinking that
watcher.watch(signal)
could simply return a function that removes that watcher reference. It'd allow for duplicate watchers, and it'd simplify managing watchers a bit.The text was updated successfully, but these errors were encountered: