You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setTimeout is not working properly with non-integer in Node 11 #24203
Platform:Darwin suguru 17.7.0 Darwin Kernel Version 17.7.0: Fri Jul 6 19:54:51 PDT 2018; root:xnu-4570.71.3~2/RELEASE_X86_64 x86_64
Subsystem: timers
I have tested setTimeout and realized the function seems to have an issue when it is called with non-integer, such as 1.1 * 100 (110.00000000000001).
The function will stop calling a callback function randomly and eat up high CPU usage.
The code is as below,
Activity
addaleax commentedon Nov 6, 2018
/cc @apapirovski
targos commentedon Nov 6, 2018
@nodejs/timers
Trott commentedon Nov 21, 2018
Confirmed to still be a bug in Node.js 11.2.0.
Fishrock123 commentedon Nov 21, 2018
This should be fixed on master.
suguru03 commentedon Nov 23, 2018
@Trott @Fishrock123 Thanks for the confirmation! 😄
I hope it is fixed soon.
Trott commentedon Nov 23, 2018
@Fishrock123 Sorry to say that this is not fixed on master. The code to replicate above still hangs with an executable compiled from current master.
Fishrock123 commentedon Nov 23, 2018
Oh whoops this wasn't the issue I thought it was...
timers: fix setTimeout expiration logic
Trott commentedon Dec 1, 2018
Fixed in e9de435
timers: fix setTimeout expiration logic
timers: fix setTimeout expiration logic