| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This was not a user-facing bug, so no change note required. |
Sorry, something went wrong.
| * @param milliseconds time to delay | ||
| * @param opts.unref if true, the timer will not prevent the process from exiting | ||
| */ | ||
| export async function delay(milliseconds: number, opts: { unref: boolean }) { |
There was a problem hiding this comment.
Idea you can take or leave: it might make our code slightly more readable to rename unref to something like allowProcessExitDuringDelay.
Sorry, something went wrong.
| return new Promise((resolve) => setTimeout(resolve, milliseconds).unref()); | ||
| /** | ||
| * @param milliseconds time to delay | ||
| * @param unref if true, the timer will not prevent the process from exiting |
There was a problem hiding this comment.
Nit: update JSDoc. The spec recommends writing down two @params for a destructured parameter, which seems a little verbose (https://jsdoc.app/tags-param.html#parameters-with-properties).
Sorry, something went wrong.
There was a problem hiding this comment.
Hmmm...that's a little verbose, but I'll go with the spec.
Sorry, something went wrong.
We had a problem where `waitForProcessing` was not completing before the node process ends. This is because using `unref` would allow the node process to end without having the `delay` function complete.
| Back | FazBrowse Home | New Git URL |
We had a problem where waitForProcessing was not completing before the node process ends. This is because using unref would allow the node process to end without having the delay function complete.
Merge / deployment checklist