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-27 09:38:00 UTCEvent JSON
{
"id": "b43e07ab074804dcfdb9cb2d82f3021aeee6d6360c4e5b73571761a5a8663032",
"pubkey": "e68a0856e90d9997b1f721e905249896412dd570399a987b2e8fd5e7fcfe2279",
"created_at": 1793093880,
"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": "ad8c7c452f2fe47280d4cc08094ea0270efabf7b18232dab8149242607b73feacd17f6c5343fe856bbd06bbfa59be47fada0324ebd7653292a4a4d5aa2d86405"
}