Yield the BBQueue writer instead of spin looping

This commit is contained in:
Kerollmops
2024-12-04 14:16:40 +01:00
parent 54341c2e80
commit 261d2ceb06

View File

@ -661,6 +661,11 @@ where
if sender.is_disconnected() {
return Err(Error::InternalError(InternalError::AbortedIndexation));
}
// We prefer to yield and allow the writing thread
// to do its job, especially beneficial when there
// is only one CPU core available.
std::thread::yield_now();
}
}