300-835 · Question #36
What does a single-threaded client application do when an API is consumed synchronously?
The correct answer is D. It blocks processing until a response is received from the service. When a single-threaded client calls an API synchronously, execution halts at that call site - the thread cannot do anything else until the response arrives, making D correct. This is the defining characteristic of synchronous (blocking) I/O: the calling thread is held hostage…
Question
Exhibit
Options
- AIt receives a slower response from the API service.
- BIt continues processing without waiting for a response.
- CIt receives a quicker response from the API service.
- DIt blocks processing until a response is received from the service.
How the community answered
(21 responses)- A5% (1)
- B5% (1)
- D90% (19)
Explanation
When a single-threaded client calls an API synchronously, execution halts at that call site - the thread cannot do anything else until the response arrives, making D correct. This is the defining characteristic of synchronous (blocking) I/O: the calling thread is held hostage until the operation completes.
Why the distractors are wrong:
- A & C conflate speed of the response with how the client waits - synchronous vs. asynchronous has nothing to do with how fast the server replies; it only determines whether the caller blocks.
- B describes asynchronous behavior, where the client registers a callback or awaits a future and continues executing other work in the meantime.
Memory tip: Think of a synchronous call like a phone call where you stay on the line saying nothing until the other person answers - you're blocked. An asynchronous call is like leaving a voicemail and going about your day until they call back.
Topics
Community Discussion
No community discussion yet for this question.
