| Previous | Next |
| ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE | ERROR_TIMER_RESUME_IGNORED |
ERROR_NO_YIELD_PERFORMED
A yield request found no other runnable thread
ERROR_NO_YIELD_PERFORMED corresponds to Win32 error value documented as: A yield execution was performed and no thread was available to run. The scheduler accepted a yield-style request but there was no eligible thread to run, so execution could not be handed off as anticipated. This is generally a scheduling observation, not evidence of system failure.
Where the result appears in real systems
- Low-level synchronization loops.
- Compatibility code using yield as a backoff mechanism.
- Diagnostics around SwitchToThread-like behavior.
Evidence to collect before changing the system
record CPU count, thread priority, affinity mask, and contention state; inspect whether the loop has a real blocking primitive available; use ETW scheduler traces when high CPU usage accompanies repeated yields
Keep the original numeric value, symbolic name, API return path, thread and process identity, and the exact timestamp in one diagnostic record. Those fields prevent later layers from replacing this specific result with a generic failure and make correlation with ETW or Event Viewer practical.
Handling and recovery
Do not treat yielding as guaranteed progress. Replace busy loops with events, condition variables, waits, or bounded exponential backoff when another thread must produce work.
Code that receives this result should classify it according to the operation that produced it: completion information, a recoverable environmental condition, or a programming defect. The result classification should be made at the API boundary where the caller still knows the handle, object, flags, and expected state.
What not to infer from this code
This result differs from a wait timeout: the caller did not block for an interval; it merely found no runnable peer to receive the processor.
Implementation guidance
Preserve this result through logging and telemetry instead of immediately converting it to free-form text. When it crosses an HRESULT boundary, record both the original Win32 value and the converted HRESULT; when it crosses RPC, JSON, or another protocol, include an explicit error-domain field so the receiver does not convert it twice.
A useful automated test for this Win32 error should reproduce the relevant state transition, assert the exact returned value, and verify cleanup after both the normal and exceptional path. The test for this Win32 error should also check that a retry is performed only when the underlying state can genuinely change, because unconditional retries often hide ownership, architecture, power, or resource-negotiation defects.
References
Looking for a different code? Search another status or error code.
