Node.js에서 단일 스레드 비 차단 IO 모델 작동 방식
저는 노드 프로그래머는 아니지만 단일 스레드 비 차단 IO 모델의 작동 방식에 관심이 있습니다. understand-the-node-js-event-loop 기사를 읽은 후에는 정말 혼란 스럽습니다. 모델에 대한 예를 제공했습니다. 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(); } ); …