Q11. How does structured concurrency and cancellation work with coroutines?
A coroutine is cooperative: cancellation sets a flag that the coroutine must observe. Suspend functions from `kotlinx.coroutines` check automatically and throw `Cancellat...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (16 available).
A coroutine is cooperative: cancellation sets a flag that the coroutine must observe. Suspend functions from `kotlinx.coroutines` check automatically and throw `Cancellat...
`context.Context` carries deadlines, cancellation signals and request-scoped values across API boundaries and goroutines. It is how cancellation and timeouts propagate th...
The bounded buffer is solved with one mutex plus two counting semaphores, `empty` and `full`. ```c sem_t empty, full; pthread_mutex_t m; buffer[N]; int head, tail; void p...
MRI, the standard Ruby implementation, has a Global VM Lock: only one thread executes Ruby bytecode at a time, so threads do not provide CPU parallelism for pure Ruby cod...
Go's advice is "do not communicate by sharing memory; share memory by communicating", but both tools are legitimate. - Use a mutex when protecting a small piece of shared...
A thread pool keeps a set of worker threads alive so tasks avoid per-request thread-creation cost. Core pieces: - A task queue, typically bounded, holding runnable work. ...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.