ccls/src/ipc_manager.h

29 lines
551 B
C
Raw Normal View History

#pragma once
#include "ipc.h"
#include "threaded_queue.h"
#include <memory>
class lsBaseOutMessage;
struct IpcManager {
struct StdoutMessage {
IpcId id;
std::string content;
};
ThreadedQueue<StdoutMessage> for_stdout;
ThreadedQueue<std::unique_ptr<BaseIpcMessage>> for_querydb;
static IpcManager* instance();
static void CreateInstance(MultiQueueWaiter* waiter);
static void WriteStdout(IpcId id, lsBaseOutMessage& response);
2017-09-22 01:14:57 +00:00
private:
explicit IpcManager(MultiQueueWaiter* waiter);
static IpcManager* instance_;
};