A little bit confused by timeoutId
See original GitHub issuethis.timers[timeoutId] = timeoutId
actually setTimeout return an object in Node.js so the key in this.timers is ‘[object object]’ so it will be override every time so the timer always hold only one child
maybe not works as you expected?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Scheduling: setTimeout and setInterval
Nested setTimeout allows to set the delay between the executions more precisely than setInterval . Let's compare two code fragments. The first ...
Read more >Confused with set timeout - Stack Overflow
I'm really confused how these work...the timeout does not seem to keep running it calls begin_anim once and then thats it.
Read more >Query on system settings : r/QRadar - Reddit
I am little bit confused with these TCP options. ... Timeout for Idle TCP Syslog Connections (seconds) : What is this ?
Read more >setTimeout JavaScript Function: Guide with Examples - SitePoint
To demonstrate the concept in more detail, the following demo displays a popup, ... const timeoutID = setTimeout(code); const timeoutID ...
Read more >JavaScript Timers with setTimeout and setInterval
setTimeout() allows you to specify that a piece of JavaScript code (called ... where expression is the JavaScript code to run after timeout...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I noticed this bug and was going to suggest a combination of
Date.now()
andMath.random()
However, I wasn’t able to actually reproduce the bug in Node. Turns out in Nonde v14.9.0 and v12.19.0 they added a method to the
Timeout
object[Symbol.toPrimitive]
which converts it to a number. As such it now “just works” and a compatible number is used as the key.Unless you want to support older versions of Node I think you can close this.
Thanks for the note! Closing for now then.