user8576367
user8576367

Reputation: 227

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?

Upvotes: 1

Views: 2131

Answers (1)

Santosh Singh
Santosh Singh

Reputation: 569

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

Upvotes: 4

Related Questions