18 #include <condition_variable> 73 void flush()
override;
129 std::array<std::vector<std::string>, 2>
queues;
145 void onIoError(
const std::exception& ex);
std::vector< uint8_t > buffer(kBufferSize+16)
void writeMessage(folly::StringPiece buffer, uint32_t flags=0) override
std::condition_variable messageReady_
const folly::File & getFile() const
folly::Synchronized< Data, std::mutex >::LockedPtr lockedData_
void setMaxBufferSize(size_t size)
std::vector< std::string > * getCurrentQueue()
size_t getMaxBufferSize() const
—— Concurrent Priority Queue Implementation ——
AsyncFileWriter(folly::StringPiece path)
typename Base::LockedPtr LockedPtr
constexpr auto size(C const &c) -> decltype(c.size())
std::condition_variable ioCV_
std::string getNumDiscardedMsg(size_t numDiscarded)
static constexpr size_t kDefaultMaxBufferSize
constexpr auto data(C &c) -> decltype(c.data())
bool ttyOutput() const override
folly::Synchronized< Data, std::mutex > data_
void onIoError(const std::exception &ex)
void performIO(std::vector< std::string > *ioQueue, size_t numDiscarded)
std::array< std::vector< std::string >, 2 > queues
void stopIoThread(folly::Synchronized< Data, std::mutex >::LockedPtr &data, uint32_t extraFlags)