1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00

no col backoff

This commit is contained in:
vsadov 2024-12-29 17:03:33 -08:00
parent 52ca9542f1
commit dd91c63355

View file

@ -220,13 +220,13 @@ public:
{
_ASSERTE(collisions > 0);
// no need for much randomness here, we will just hash the stack location and a timestamp.
uint32_t rand = ((uint32_t)(size_t)&collisions + (uint32_t)GetCheapTimeStamp()) * 2654435769u;
uint32_t spins = rand >> (uint8_t)((uint32_t)32 - min(collisions, MaxExponentialBackoffBits));
for (int i = 0; i < (int)spins; i++)
{
YieldProcessor();
}
//// no need for much randomness here, we will just hash the stack location and a timestamp.
//uint32_t rand = ((uint32_t)(size_t)&collisions + (uint32_t)GetCheapTimeStamp()) * 2654435769u;
//uint32_t spins = rand >> (uint8_t)((uint32_t)32 - min(collisions, MaxExponentialBackoffBits));
//for (int i = 0; i < (int)spins; i++)
//{
// YieldProcessor();
//}
}
private: