fix(advanced-search): upstream polish — guard DoSearch drain, Yield in worker drain, drop dead ParseValue surface

This commit is contained in:
Kamron Batman 2026-07-19 22:31:50 -07:00
parent 70ca48cc6b
commit dcedf91d9e
3 changed files with 14 additions and 8 deletions

View file

@ -118,8 +118,10 @@ public class AdvancedSearchThreadWorker
}
else
{
// Queue is transiently empty but we're not paused yet; avoid a 100%-CPU busy-spin.
Thread.SpinWait(1);
// Queue is transiently empty but we're not paused yet; yield the core to
// other runnable threads (e.g. the other still-filtering workers) instead
// of busy-spinning.
Thread.Yield();
}
}