Skip to content

Make setTimeout and setImmediate timers run consecutively #8460

Closed
@bnoordhuis

Description

@bnoordhuis

Continuing from libuv/libuv#1035 (comment):

Node.js uses a uv_idle_t handle to implement setImmediate() timers but I think it could - and should - hang them off the big setTimeout() timer.

Right now you have this weird situation where:

a) setTimeout timers run,
b) some other callbacks run (mostly close callbacks), then
c) setImmediate timers run.

Metadata

Metadata

Assignees

Labels

discussIssues opened for discussions and feedbacks.timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions