+ 2

Threading

How multi threading and event loop work ?

18th Apr 2025, 3:39 PM
Gaurav Kumar
Gaurav Kumar - avatar
1 Answer
+ 4
Synchronous and asynchronous is the basic answer though. An event loop model commonly used to handle I/O-bound tasks e.g. network request or file operations. Unlike multithreading, it operates in a single thread, avoiding synchronization overhead. Where, multithreading enables a program to execute multiple threads concurrently or simultaneously, managed by the operating system and threads share the same memory space called heap, making data exchange more efficient. You can can have a true parallelism here. For more details, visit this: https://stackoverflow.com/questions/21485920/single-threaded-event-loop-vs-multi-threaded-non-blocking-worker-in-node-js
18th Apr 2025, 5:22 PM
`ᎎᔗᔗዚ
`ᎎᔗᔗዚ - avatar