Re:A proposal to add signals to JavaScript
by __s on Sunday March 31, 2024 @03:29PM
(#39887280)
That looks like it fits with the theme, but events are difficult to compose & tend to have easy leaks by requiring explicit attach/detach (not that I'm sure the proposal here addresses those issues)
[ Parent
| on HN ]
Re:A proposal to add signals to JavaScript
by pcthrowaway on Monday April 01, 2024 @01:23AM
(#39891155)
Could you not just compose a new EventEmitter constructor that uses the new FinalizationRegistry API to drop all handlers of subjects which have since been garbage collected?