Skip to content

fix: unref timers#12482

Merged
Koenkk merged 2 commits into
masterfrom
unref-timers
Jun 21, 2026
Merged

fix: unref timers#12482
Koenkk merged 2 commits into
masterfrom
unref-timers

Conversation

@Nerivec

@Nerivec Nerivec commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Avoid holding the event loop with timers.
All of these are background ops, with low impact, so, shouldn't be a problem.
Might end up solving a few "weird" shutdown-related issues.

Also switched some "sleep" usage to the dedicated util.

Note: a further refactor could be improving the store and specifically properly cleaning up timers (currently buried in random objects) with a ZHC shutdown sequence.

@github-actions

Copy link
Copy Markdown
Contributor

External review required

This PR modifies files that require review from their code owners before merging.

@candeodevelopment @dhc25:

  • src/devices/candeo.ts

@InovelliUSA @rohankapoorcom:

  • src/lib/inovelli.ts

Once reviewed, add the external-reviewer-approved label to unblock this check.

@Koenkk

Koenkk commented Jun 20, 2026

Copy link
Copy Markdown
Owner

For convenience, maybe we can introduce a setTimeoutAndUnref?

@Nerivec

Nerivec commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author

Actually, we can chain it (returns self), cleaner than adding a wrapper.

@Koenkk

Koenkk commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Actually, we can chain it (returns self), cleaner than adding a wrapper.

Even cleaner indeed, thank!

@Koenkk Koenkk merged commit 8dfcd87 into master Jun 21, 2026
6 of 7 checks passed
@Koenkk Koenkk deleted the unref-timers branch June 21, 2026 05:45
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