All fields

“Event Loop & Concurrency” in Information Technology

20 questions across 3 technologies.

Information Technology

20 questions in 3 technologies

#QuestionTechnologyTopicLevel
1How does the event loop decide what to run next? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
2What's the relationship between requestAnimationFrame and the event loop's rendering step? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
3Why does a long synchronous function block UI updates and event handling? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
4Is JavaScript single-threaded, and what does that mean in practice? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyBeginner
5What is the call stack? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyBeginner
6What is the difference between the microtask queue and the macrotask (task) queue? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyIntermediate
7Why does Promise.resolve().then(cb) run before setTimeout(cb, 0), even with a 0ms delay? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
8How would you break a large synchronous task into chunks to keep the UI responsive? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
9What is 'starvation' of the macrotask queue, and how can recursive microtasks cause it? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
10How does async/await map onto the microtask queue under the hood? JavaScript › Event Loop & ConcurrencyJavaScriptEvent Loop & ConcurrencyAdvanced
11What is the difference between concurrency and parallelism, and which one does Node.js's event loop actually provide by default? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOBeginner
12What is the difference between how Node.js handles I/O-bound concurrency versus CPU-bound work, and why does this distinction shape Node.js's ideal use cases? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
13How does asyncio's event loop schedule and switch between multiple coroutines, and what makes this cooperative rather than preemptive? Python › Concurrency (asyncio/threading/multiprocessing)PythonConcurrency (asyncio/threading/multiprocessing)Advanced
14How do you safely run a blocking, synchronous function from within an asyncio coroutine without freezing the event loop? Python › Concurrency (asyncio/threading/multiprocessing)PythonConcurrency (asyncio/threading/multiprocessing)Advanced
15How would you use concurrent.futures.ProcessPoolExecutor together with asyncio to run CPU-bound work without blocking the event loop? Python › Concurrency (asyncio/threading/multiprocessing)PythonConcurrency (asyncio/threading/multiprocessing)Advanced
16How does Node.js achieve high concurrency for I/O-bound workloads despite running JavaScript on a single main thread? Node.js › Node.js Fundamentals & Runtime ArchitectureNode.jsNode.js Fundamentals & Runtime ArchitectureAdvanced
17How do you run multiple async iterators concurrently and merge their results? JavaScript › Async Iterators & StreamsJavaScriptAsync Iterators & StreamsAdvanced
18Why can errors thrown inside a setTimeout callback NOT be caught by a surrounding try/catch? JavaScript › Error HandlingJavaScriptError HandlingAdvanced
19Why can setInterval() be a subtle source of memory leaks, and how do you avoid it? JavaScript › Memory Management & Garbage CollectionJavaScriptMemory Management & Garbage CollectionAdvanced
20How does a WebSocket connection differ fundamentally from repeated fetch() requests? JavaScript › Networking: Fetch, XHR, WebSockets & CORSJavaScriptNetworking: Fetch, XHR, WebSockets & CORSAdvanced