ClickHouse/src/Common/EventFD.h

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

39 lines
384 B
C++
Raw Normal View History

#pragma once
#if defined(OS_LINUX)
#include <cstddef>
#include <cstdint>
namespace DB
{
struct EventFD
{
EventFD();
~EventFD();
2022-11-24 16:04:35 +00:00
/// 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;
};
}
2022-11-23 14:05:26 +00:00
#else
namespace DB
{
struct EventFD
{
};
}
#endif