-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathxserver_control_main.cpp
43 lines (35 loc) · 1.41 KB
/
xserver_control_main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/***************************************************************************
* Copyright (c) 2016, Johan Mabille, Sylvain Corlay, Martin Renou *
* Copyright (c) 2016, QuantStack *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/
#include <thread>
#include <chrono>
#include <iostream>
#include "xeus/xserver_control_main.hpp"
#include "xeus/xguid.hpp"
#include "xeus/xmiddleware.hpp"
#include "zmq_addon.hpp"
#include "xcontrol.hpp"
namespace xeus
{
xserver_control_main::xserver_control_main(zmq::context_t& context, const xconfiguration& config)
: xserver_zmq_split(context, config)
{
}
xserver_control_main::~xserver_control_main()
{
}
void xserver_control_main::start_impl(zmq::multipart_t& message)
{
xserver_zmq_split::start_publisher_thread();
xserver_zmq_split::start_heartbeat_thread();
xserver_zmq_split::start_shell_thread();
xserver_zmq_split::get_controller().publish(message);
xserver_zmq_split::get_controller().run();
std::exit(0);
}
}