ClickHouse/src/Common/EventFD.h
Nikolai Kochetov d53439390f Review fixes.
2022-11-24 16:04:35 +00:00

39 lines
384 B
C++

#pragma once
#if defined(OS_LINUX)
#include <cstddef>
#include <cstdint>
namespace DB
{
struct EventFD
{
EventFD();
~EventFD();
/// Both read() and write() are blocking.
/// TODO: add non-blocking flag to ctor.
uint64_t read() const;
bool write(uint64_t increase = 1) const;
int fd = -1;
};
}
#else
namespace DB
{
struct EventFD
{
};
}
#endif