MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / dictRehashAsync

Function dictRehashAsync

src/dict.cpp:449–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447}
448
449void dictRehashAsync(dictAsyncRehashCtl *ctl) {
450 if (ctl->abondon.load(std::memory_order_acquire)) {
451 ctl->hashIdx = ctl->queue.size();
452 }
453 for (size_t idx = ctl->hashIdx; idx < ctl->queue.size(); ++idx) {
454 auto &wi = ctl->queue[idx];
455 wi.hash = dictHashKey(ctl->dict, dictGetKey(wi.de));
456 }
457 ctl->hashIdx = ctl->queue.size();
458 ctl->done = true;
459}
460
461bool dictRehashSomeAsync(dictAsyncRehashCtl *ctl, size_t hashes) {
462 if (ctl->abondon.load(std::memory_order_acquire)) {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected