Replies: 1 comment 1 reply
-
I tested with the latest node 22.0.0 a few times. It always only log 1 and about 2.6s then it exits.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a test as code below but don't understand its behavior:
The output below will sometimes log "1 2 3", but sometimes just log "1". It is not consistent.
So I think when I called unref method for both 'x' and 'y'. Before beginning a new tick, there is no timeout reference, and event loop should exit. So what I expected from the below code is just logging 1.
but actually, it is not consistent as I described above.
Can anyone help me explain its behavior, I'm a person who really curious, and interested in some stuff like this.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions