| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The name withTimeout() gives the impression that it would limit the execution of the promise to the given time bound. But that is not the case: it is only the _waiting_ that is limited, and the promise would keep running beyond the time bound. This commit renames withTimeout() to waitForResultWithTimeLimit() so that developers are more likely to understand the actual behavior of this function.
There was a problem hiding this comment.
This PR renames the withTimeout() function to waitForResultWithTimeLimit() to better clarify its behavior. The function doesn't actually stop promise execution after the timeout - it only stops waiting for the result while the promise continues running in the background.
Key changes:
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file| File | Description |
|---|---|
| src/util.ts | Renamed the function definition and updated related comment |
| src/util.test.ts | Updated test names and function calls to use new name |
| src/trap-caching.ts | Updated import and function calls |
| src/overlay-database-utils.ts | Updated import and function calls |
| lib/init-action.js | Updated compiled JavaScript with function rename |
| lib/analyze-action.js | Updated compiled JavaScript with function rename |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The name withTimeout() gives the impression that it would limit the execution of the promise to the given time bound. But that is not the case: it is only the waiting that is limited, and the promise would keep running beyond the time bound.
This PR renames withTimeout() to waitForResultWithTimeLimit() so that developers are more likely to understand the actual behavior of this function.
Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist