ccls/src/messages/exit.cc

19 lines
480 B
C++
Raw Normal View History

2017-12-05 08:14:46 +00:00
#include "message_handler.h"
namespace {
2018-03-22 05:01:21 +00:00
struct In_Exit : public NotificationInMessage {
MethodType GetMethodType() const override { return kMethodType_Exit; }
2017-12-06 04:39:44 +00:00
};
MAKE_REFLECT_EMPTY_STRUCT(In_Exit);
REGISTER_IN_MESSAGE(In_Exit);
2017-12-06 04:39:44 +00:00
struct Handler_Exit : MessageHandler {
MethodType GetMethodType() const override { return kMethodType_Exit; }
2017-12-05 08:14:46 +00:00
2018-03-22 05:01:21 +00:00
void Run(std::unique_ptr<InMessage> request) override {
2017-12-05 08:14:46 +00:00
exit(0);
}
};
REGISTER_MESSAGE_HANDLER(Handler_Exit);
} // namespace