Skip to content

Use of process.nextTick() at db/users.js #23

@jilvin

Description

@jilvin

@jaredhanson Is the use of process.nextTick() at db/users.js necessary?

It seems you have clarified the addition of nextTick on a stack overflow question.
https://stackoverflow.com/questions/20743348/passport-js-and-process-nexttick-in-strategy

Maybe we should add a comment stating the reason of usage.

A lot has changed regarding the execution of nextTick since Node v12. Should we shift to the use of setImmediate()(since nextTick gets executed immediately in the current phase itself of the event loop)?

PS: I am a beginner. I am pondering around to improve my knowledge on the subject. Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions