codementor on Nostr: Learn: Starvation Starvation: a thread is ready to work but never gets the resource ...
Learn: Starvation
Starvation: a thread is ready to work but never gets the resource or CPU time, because others keep taking it. Unlike a deadlock, the program still moves; one part just never does.
Classic example: a lock that is not fair. Monitor (lock) doesn't promise first come, first served, so under heavy use one thread can keep losing.
In .NET servers, a related problem is thread-pool starvation: blocking calls (.Result, .Wait()) hold pool threads, so new requests wait.
Read more:
https://learn.microsoft.com/en-us/dotnet/standard/threading/managed-threading-best-practices#tip · TIP-080
Published at
2026-10-13 17:08:04 UTCEvent JSON
{
"id": "71f4a9634a7874f7ece915dfd9f6de31eecdffe2797ea024a727033afdb2e53e",
"pubkey": "e68a0856e90d9997b1f721e905249896412dd570399a987b2e8fd5e7fcfe2279",
"created_at": 1791911284,
"kind": 1,
"tags": [
[
"t",
"tip"
]
],
"content": "Learn: Starvation\n\nStarvation: a thread is ready to work but never gets the resource or CPU time, because others keep taking it. Unlike a deadlock, the program still moves; one part just never does.\nClassic example: a lock that is not fair. Monitor (lock) doesn't promise first come, first served, so under heavy use one thread can keep losing.\nIn .NET servers, a related problem is thread-pool starvation: blocking calls (.Result, .Wait()) hold pool threads, so new requests wait.\n\nRead more: https://learn.microsoft.com/en-us/dotnet/standard/threading/managed-threading-best-practices\n\n#tip · TIP-080",
"sig": "bedaefb33b4f5c507a73f9e9b979f2963f8b6cd51d3eedcf173e4e47b0902c2e31d5615e14751bd0bea5aeb26da0564580b234507e5edbfe0ff87e16765852e7"
}