Unpin all of 'pages'. If 'delay_between_unpins_ms' > 0, sleep between unpins.
| 282 | |
| 283 | /// Unpin all of 'pages'. If 'delay_between_unpins_ms' > 0, sleep between unpins. |
| 284 | void UnpinAll(BufferPool* pool, ClientHandle* client, vector<PageHandle>* pages, |
| 285 | int delay_between_unpins_ms = 0) { |
| 286 | for (auto& page : *pages) { |
| 287 | pool->Unpin(client, &page); |
| 288 | if (delay_between_unpins_ms > 0) SleepForMs(delay_between_unpins_ms); |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | void DestroyAll(BufferPool* pool, ClientHandle* client, vector<PageHandle>* pages) { |
| 293 | for (auto& page : *pages) pool->DestroyPage(client, &page); |