Check the replay queue for room again after taking the core back, since another thread may have filled it meanwhile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-10-26 07:44:43 +03:00
1 parent 9bf73a3646
commit 9ddbc7b49d
1 file changed
+2 -1
+2 -1
View File
@@ -263,7 +263,8 @@ static uint64_t replay_enqueue(ReplayItem *it) {
CloseHandle(h);
r_started = 1;
}
if (rq_n == RQ_CAP) {
// rl is dropped while the core is taken back, and another thread may fill the queue again meanwhile: check again.
while (rq_n == RQ_CAP) {
uint64_t p0 = perf_begin();
dr_calls[DR_FULL]++, dr_tcalls[DR_FULL]++;
int away = core_away_unlocked();