Switched away from boost::asio as it doesn't play well with libpq
This commit is contained in:
parent
6dd079bf87
commit
6bb5525d5e
13 changed files with 566 additions and 143 deletions
|
|
@ -4,7 +4,6 @@
|
|||
# include <winsock2.h>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "GlobalIoService.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
@ -29,19 +28,13 @@ int main(int argc, char *argv[])
|
|||
QCoreApplication::setOrganizationDomain("eelkeklein.nl");
|
||||
QCoreApplication::setApplicationName("pglab");
|
||||
|
||||
std::thread asio_service_thread;
|
||||
int result = -1;
|
||||
{
|
||||
auto ios = getGlobalAsioIoService();
|
||||
boost::asio::io_service::work work(*ios); // Prevent service from running out of work so run doesn't return
|
||||
asio_service_thread = std::thread([ios](){ ios->run(); });
|
||||
|
||||
// make sure the io_service is stopped before we wait on the future
|
||||
auto master_controller = std::make_unique<MasterController>();
|
||||
master_controller->init();
|
||||
result = a.exec();
|
||||
}
|
||||
asio_service_thread.join();
|
||||
#ifdef WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue