Closed DesignByOnyx closed 1 year ago
OK - I see that I can await watch(...)
to get the controller. I'll keep this open so the docs get updated, and I'd like feedback on the abort signal as I'd prefer use that.
Where in documentation does this lack clarity?
The screenshot shows what is wrong with the current docs, I'll summarize here:
const { shutdown } = watch(...)
does not work. You must await watch(...)
.abortSignal
is not a valid option, though this would be really nice to have.https://github.com/gajus/turbowatch/compare/main...DesignByOnyx:designbyonyx/docs-update?expand=1
abortSignal is not a valid option, though this would be really nice to have.
What benefit would that have over the current shutdown
method?
:tada: This issue has been resolved in version 2.24.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
What benefit would that have over the current shutdown method?
Shutdown works fine. It would just be nice alternative to shutdown
which reinforces a good pattern for dealing with multiple related async tasks. It's not a big deal though. I really appreciate all the work you've done!
FYI it's been added.
The docs describe gracefully terminating with examples using an abort signal or a shutdown method, neither of which are available:
Is there a recommended way to gracefully terminate?