ClickHouse/src/Storages/TableLockHolder.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
368 B
C++
Raw Normal View History

2019-03-05 10:12:20 +00:00
#pragma once
#include <Common/RWLock.h>
namespace DB
{
2020-06-22 09:49:21 +00:00
using TableLockHolder = RWLockImpl::LockHolder;
/// Table exclusive lock, holds both alter and drop locks. Useful for DROP-like
/// queries.
2020-06-18 16:10:47 +00:00
struct TableExclusiveLockHolder
{
2020-06-18 16:10:47 +00:00
void release() { *this = TableExclusiveLockHolder(); }
2019-08-27 14:31:34 +00:00
private:
friend class IStorage;
2020-06-22 09:49:21 +00:00
TableLockHolder drop_lock;
2019-03-05 10:12:20 +00:00
};
}