mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
23 lines
368 B
C++
23 lines
368 B
C++
#pragma once
|
|
|
|
#include <Common/RWLock.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using TableLockHolder = RWLockImpl::LockHolder;
|
|
|
|
/// Table exclusive lock, holds both alter and drop locks. Useful for DROP-like
|
|
/// queries.
|
|
struct TableExclusiveLockHolder
|
|
{
|
|
void release() { *this = TableExclusiveLockHolder(); }
|
|
|
|
private:
|
|
friend class IStorage;
|
|
|
|
TableLockHolder drop_lock;
|
|
};
|
|
|
|
}
|