Skip to content

Conversation

@DullReferenceException
Copy link

Add option to unref the TTL timer. Doing so will avoid a cache keeping a NodeJS process alive with its timer event handlers.

Add option to unref the TTL timer. Doing so will avoid a cache keeping a
NodeJS process alive with its timer event handlers.
@DullReferenceException
Copy link
Author

The reason for this PR is that when I tried integrating it in our application, unit test processes and the worker processes as well were not exiting as they did before, and the setTimeout calls were the cause. The .unref() will tell node to ignore that there are outstanding timeouts when it's deciding whether the event loop can terminate. Mind taking a look, @norganna?

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