When executing a long-processing task in a request callback function with NodeJS,
handler = function(req, res) {
// long CPU processing task (non I/O), e.g. compute N digits of Pi
}
net.createServer(handler);
or
var express = require('express');
var app = express();
app.get('/', function (req, res) {
// long processing task
});
app.listen(3000);
is it still the same tread (then is it blocking?) or not?
Note: I know it's probably not good practice to do a long processing task here, but I'm curious about how NodeJS handles it.