单线程非阻塞IO模型是如何在Node.js中工作的
c.query(
'SELECT SLEEP(20);',
function (err, results, fields) {
if (err) {
throw err;
}
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<html><head><title>Hello</title></head><body><h1>Return from async DB query</h1></body></html>');
c.end();
});
qq_遁去的一_1
BIG阳
繁星淼淼
随时随地看视频慕课网APP
相关分类