Skip to content
This repository was archived by the owner on Aug 10, 2021. It is now read-only.
This repository was archived by the owner on Aug 10, 2021. It is now read-only.

nextTick() used 'for effect' - is this necessary, if so, why? #20

Open
@mikemaccana

Description

@mikemaccana

https://github.com/rethinkdb/rethinkdb-example-nodejs-chat/blob/master/app.js#L48 has

passport.use(new local(
  function(username, password, done) {
    // asynchronous verification, for effect...
    process.nextTick(function () {

Is the nextTick() actually necessary, or is it 'for effect'?

  • If it's necessary, why is it necessary? The comment is very vague.
  • If it's not necessary, should the nextTick be removed?

Thanks for taking the time to answer this - I understand what nextTick() does, but it's not apparent why it's being used here.

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