close callbacks phase

The last phase of each event loop turn, which runs close handlers, such as a socket's close event after socket.destroy().

In more detail

Keeping teardown in its own phase means resources are released after the other work of the turn. Once it finishes, the loop checks whether any active handles remain before starting another turn.

Related terms

Taught in

References