MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / claimLocalTable

Method claimLocalTable

src/processor/result/factorized_table_pool.cpp:6–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace processor {
5
6FactorizedTable* FactorizedTablePool::claimLocalTable(storage::MemoryManager* mm) {
7 std::unique_lock<std::mutex> lck{mtx};
8 if (availableLocalTables.empty()) {
9 auto table = std::make_shared<FactorizedTable>(mm, globalTable->getTableSchema()->copy());
10 localTables.push_back(table);
11 availableLocalTables.push(table.get());
12 }
13 auto result = availableLocalTables.top();
14 availableLocalTables.pop();
15 return result;
16}
17
18void FactorizedTablePool::returnLocalTable(FactorizedTable* table) {
19 std::unique_lock<std::mutex> lck{mtx};

Callers 3

RJVertexComputeMethod · 0.80

Calls 7

pushMethod · 0.80
popMethod · 0.80
emptyMethod · 0.45
copyMethod · 0.45
getTableSchemaMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected