mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Make noncopyable
This commit is contained in:
parent
a97ba9741e
commit
20c537addd
@ -155,11 +155,15 @@ private:
|
||||
Poco::Logger * logger = &Poco::Logger::get("GlobalOvercommitTracker");
|
||||
};
|
||||
|
||||
// This class is used to disallow tracking during logging to avoid deadlocks.
|
||||
struct OvercommitTrackerBlockerInThread
|
||||
{
|
||||
OvercommitTrackerBlockerInThread() { ++counter; }
|
||||
~OvercommitTrackerBlockerInThread() { --counter; }
|
||||
|
||||
OvercommitTrackerBlockerInThread(OvercommitTrackerBlockerInThread const &) = delete;
|
||||
OvercommitTrackerBlockerInThread & operator=(OvercommitTrackerBlockerInThread const &) = delete;
|
||||
|
||||
static bool isBlocked() { return counter > 0; }
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user