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

setTimeout eating CPU time and doing infinity stuck with non-whole delay #24897

Closed
SaltyMonkey opened this issue Dec 7, 2018 · 2 comments
Closed
Labels
timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Comments

@SaltyMonkey
Copy link

SaltyMonkey commented Dec 7, 2018

  • Version: 11.3.0
  • Platform: Windows (possible affected another platforms too)
  • Subsystem: Timers

setTimeout eating CPU and cant fire if delay is non-whole number.

Can be easily reproduced even from node-cli:

setTimeout(()=>{console.log("timeout fired!")}, 880.0000000000001)

Working example:

setTimeout(()=>{console.log("timeout fired!")}, Math.round(880.0000000000001))

Possible related issue from past: nodejs/node-v0.x-archive#8065

Update: it working sometimes

@richardlau
Copy link
Member

Possibly addressed by #24819?

cc @nodejs/timers

@targos
Copy link
Member

targos commented Dec 7, 2018

It was fixed in #24214 and just released in Node.js 11.4.0

@targos targos closed this as completed Dec 7, 2018
@targos targos added timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. v11.x labels Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Projects
None yet
Development

No branches or pull requests

3 participants