We are using NodeJs for a highly performant backend system and need to know most of the intricacies around JavaScript and how the NodeJs event loop works. One of our dependencies is the JavaScript Kafka client and as I went around digging through the codebase, I found this line of code that uses a:
while(true) {
}
This is effectively an infinite loop yet, the Kafka consumer does not seem to block the eventloop as other functions are being executed. How is NodeJs accomplishing this?
awaitin it, so it's not blocking.