mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-10 10:30:51 +00:00
17 lines
332 B
C++
17 lines
332 B
C++
#include <Storages/IStorage.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
TableStructureReadLock::TableStructureReadLock(StoragePtr storage_, bool lock_structure, bool lock_data)
|
|
: storage(storage_)
|
|
{
|
|
if (lock_data)
|
|
data_lock.emplace(storage->data_lock);
|
|
if (lock_structure)
|
|
structure_lock.emplace(storage->structure_lock);
|
|
}
|
|
|
|
}
|