R
R
retyui2015-04-20 01:55:50
Node.js
retyui, 2015-04-20 01:55:50

Asynchronous Mongoose request?

process.nextTick(function() {
        User.findOne({ 'local.email' :  email }, function(err, user){}
...

the .findOne method is executed asynchronously, right? What is the point of using process.nextTick()
And how will it affect performance in tacos

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Shemsedinov, 2015-04-20
@MarcusAurelius

This will delay the start of the asynchronous request. It makes little sense to write like this, I can’t even imagine in what exotic case such a solution might be needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question