| 447 | } |
| 448 | |
| 449 | void 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 | |
| 461 | bool dictRehashSomeAsync(dictAsyncRehashCtl *ctl, size_t hashes) { |
| 462 | if (ctl->abondon.load(std::memory_order_acquire)) { |