Closed domenic closed 2 years ago
Feedback from @annevk and @smaug---- is that you should be able to do something like this:
const controller = new AbortController(); const watcher = new CloseWatcher({ signal: controller.signal }); controller.abort();
which will work the same as
const watcher = new CloseWatcher(); watcher.destroy();
The advantage, of course, is for cases where you have a single AbortSignal tied to many different things, one of which might be a CloseWatcher.
AbortSignal
CloseWatcher
Feedback from @annevk and @smaug---- is that you should be able to do something like this:
which will work the same as
The advantage, of course, is for cases where you have a single
AbortSignal
tied to many different things, one of which might be aCloseWatcher
.