简体   繁体   中英

Node js single threaded or multi-threaded?

many of them saying that node js is single threaded, but it process callback functions parallely during other process. as per my assumption single thread can handle only one instruction at a time. so how it process asynchroniously many instructions at a time?

Yes, Nodejs is single threaded but internally uses libuv library https://github.com/libuv/libuv

Which is written on c++ and uses thread pooling concept in case if I/O or File system operation and having internal workers for same.

you may go through link to know about deep

https://www.journaldev.com/7462/node-js-architecture-single-threaded-event-loop

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM