#pragma once
#include <sys/types.h>
#include <algorithm>
#include <iterator>
#include <memory>
#include <stdexcept>
#include <utility>
#include <boost/intrusive/slist.hpp>
#include <glog/logging.h>
#include <folly/Exception.h>
#include <folly/FileUtil.h>
#include <folly/Likely.h>
#include <folly/ScopeGuard.h>
#include <folly/SpinLock.h>
#include <folly/io/async/DelayedDestruction.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/EventHandler.h>
#include <folly/io/async/Request.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <folly/system/Pid.h>
#if __has_include(<sys/eventfd.h>)
#include <sys/eventfd.h>
#endif
namespace folly {
template <typename MessageT>
class NotificationQueue { … };
template <typename MessageT>
void NotificationQueue<MessageT>::Consumer::destroy() { … }
template <typename MessageT>
void NotificationQueue<MessageT>::Consumer::handlerReady(
uint16_t ) noexcept { … }
template <typename MessageT>
void NotificationQueue<MessageT>::Consumer::consumeMessages(
bool isDrain, size_t* numConsumed) noexcept { … }
template <typename MessageT>
void NotificationQueue<MessageT>::Consumer::init(
EventBase* eventBase, NotificationQueue* queue) { … }
template <typename MessageT>
void NotificationQueue<MessageT>::Consumer::stopConsuming() { … }
template <typename MessageT>
bool NotificationQueue<MessageT>::Consumer::consumeUntilDrained(
size_t* numConsumed) noexcept { … }
template <typename MessageT>
template <typename F>
void NotificationQueue<MessageT>::SimpleConsumer::consume(F&& foreach) { … }
namespace detail {
template <typename MessageT, typename TCallback>
struct notification_queue_consumer_wrapper
: public NotificationQueue<MessageT>::Consumer { … };
}
template <typename MessageT>
template <typename TCallback>
auto NotificationQueue<MessageT>::Consumer::make(TCallback&& callback)
-> UniquePtr { … }
}