Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix callLimit() not working when /proc is inaccessible #11

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

codedokode
Copy link
Contributor

@codedokode codedokode commented Mar 31, 2023

When /proc is not accessible, os.cpus() returns an empty list, defLimit is 0 and callLimit() doesn't run any of the functions. Fix this and also update tap which was broken in newer node versions.

isaacs pushed a commit to codedokode/promise-call-limit that referenced this pull request Mar 31, 2023
When /proc is not available and os.cpus() returns an empty list,
callLimit() doesn't run any of the functions. Fix this and also update
tap which was broken in newer node versions

PR-URL: isaacs#11
Credit: @codedokode
Close: isaacs#11
Reviewed-by: @isaacs
When /proc is not available and os.cpus() returns an empty list,
callLimit() doesn't run any of the functions. Fix this and also update
tap which was broken in newer node versions

PR-URL: isaacs#11
Credit: @codedokode
Close: isaacs#11
Reviewed-by: @isaacs

EDIT(@isaacs): formatted commit message and comment for line length,
added coverage ignore for node version-specific workaround
@isaacs isaacs merged commit ad9ab47 into isaacs:main Mar 31, 2023
@isaacs
Copy link
Owner

isaacs commented Mar 31, 2023

Thanks! Published in 1.0.2

codedokode added a commit to codedokode/node that referenced this pull request Apr 1, 2023
Some developers might be not aware that os.cpus() may return an empty list. This [has caused a bug before](isaacs/promise-call-limit#11).
codedokode added a commit to codedokode/node that referenced this pull request Apr 1, 2023
It is not obvious that in some cases cpus() returns an empty list and this has caused a bug before: isaacs/promise-call-limit#11
Trott pushed a commit to codedokode/node that referenced this pull request Apr 3, 2023
It is not obvious that in some cases cpus() returns an empty list and this has caused a bug before: isaacs/promise-call-limit#11
Trott pushed a commit to codedokode/node that referenced this pull request Apr 4, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: nodejs#47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Trott pushed a commit to codedokode/node that referenced this pull request Apr 4, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: nodejs#47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Apr 5, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Apr 5, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Apr 6, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Apr 7, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Apr 8, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Apr 13, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
danielleadams pushed a commit to nodejs/node that referenced this pull request Jul 6, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
isaacs/promise-call-limit#11

PR-URL: nodejs#47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants