mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
refactor: show thread names in GDB for better debugging (#848)
This commit is contained in:
parent
a68ed7d44f
commit
485beab4f3
@ -74,6 +74,7 @@ bool HyperionIManager::startInstance(const quint8& inst, const bool& block)
|
|||||||
if(!_runningInstances.contains(inst) && !_startQueue.contains(inst))
|
if(!_runningInstances.contains(inst) && !_startQueue.contains(inst))
|
||||||
{
|
{
|
||||||
QThread* hyperionThread = new QThread();
|
QThread* hyperionThread = new QThread();
|
||||||
|
hyperionThread->setObjectName("HyperionIManagerThread");
|
||||||
Hyperion* hyperion = new Hyperion(inst);
|
Hyperion* hyperion = new Hyperion(inst);
|
||||||
hyperion->moveToThread(hyperionThread);
|
hyperion->moveToThread(hyperionThread);
|
||||||
// setup thread management
|
// setup thread management
|
||||||
|
@ -47,6 +47,7 @@ void LedDeviceWrapper::createLedDevice(const QJsonObject& config)
|
|||||||
|
|
||||||
// create thread and device
|
// create thread and device
|
||||||
QThread* thread = new QThread(this);
|
QThread* thread = new QThread(this);
|
||||||
|
thread->setObjectName("LedDeviceWrapperThread");
|
||||||
_ledDevice = LedDeviceFactory::construct(config);
|
_ledDevice = LedDeviceFactory::construct(config);
|
||||||
_ledDevice->moveToThread(thread);
|
_ledDevice->moveToThread(thread);
|
||||||
// setup thread management
|
// setup thread management
|
||||||
|
@ -9,6 +9,8 @@ AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeig
|
|||||||
_thread(this),
|
_thread(this),
|
||||||
_grabber(grabWidth, grabHeight)
|
_grabber(grabWidth, grabHeight)
|
||||||
{
|
{
|
||||||
|
_thread.setObjectName("AmlogicWrapperThread");
|
||||||
|
|
||||||
// Connect capturing to the timeout signal of the timer
|
// Connect capturing to the timeout signal of the timer
|
||||||
connect(&_thread, SIGNAL (started()), this, SLOT(capture()));
|
connect(&_thread, SIGNAL (started()), this, SLOT(capture()));
|
||||||
}
|
}
|
||||||
|
@ -233,6 +233,7 @@ void HyperionDaemon::startNetworkServices()
|
|||||||
// Create FlatBuffer server in thread
|
// Create FlatBuffer server in thread
|
||||||
_flatBufferServer = new FlatBufferServer(getSetting(settings::FLATBUFSERVER));
|
_flatBufferServer = new FlatBufferServer(getSetting(settings::FLATBUFSERVER));
|
||||||
QThread *fbThread = new QThread(this);
|
QThread *fbThread = new QThread(this);
|
||||||
|
fbThread->setObjectName("FlatBufferServerThread");
|
||||||
_flatBufferServer->moveToThread(fbThread);
|
_flatBufferServer->moveToThread(fbThread);
|
||||||
connect(fbThread, &QThread::started, _flatBufferServer, &FlatBufferServer::initServer);
|
connect(fbThread, &QThread::started, _flatBufferServer, &FlatBufferServer::initServer);
|
||||||
connect(this, &HyperionDaemon::settingsChanged, _flatBufferServer, &FlatBufferServer::handleSettingsUpdate);
|
connect(this, &HyperionDaemon::settingsChanged, _flatBufferServer, &FlatBufferServer::handleSettingsUpdate);
|
||||||
@ -241,6 +242,7 @@ void HyperionDaemon::startNetworkServices()
|
|||||||
// Create Proto server in thread
|
// Create Proto server in thread
|
||||||
_protoServer = new ProtoServer(getSetting(settings::PROTOSERVER));
|
_protoServer = new ProtoServer(getSetting(settings::PROTOSERVER));
|
||||||
QThread *pThread = new QThread(this);
|
QThread *pThread = new QThread(this);
|
||||||
|
pThread->setObjectName("ProtoServerThread");
|
||||||
_protoServer->moveToThread(pThread);
|
_protoServer->moveToThread(pThread);
|
||||||
connect(pThread, &QThread::started, _protoServer, &ProtoServer::initServer);
|
connect(pThread, &QThread::started, _protoServer, &ProtoServer::initServer);
|
||||||
connect(this, &HyperionDaemon::settingsChanged, _protoServer, &ProtoServer::handleSettingsUpdate);
|
connect(this, &HyperionDaemon::settingsChanged, _protoServer, &ProtoServer::handleSettingsUpdate);
|
||||||
@ -249,6 +251,7 @@ void HyperionDaemon::startNetworkServices()
|
|||||||
// Create Webserver in thread
|
// Create Webserver in thread
|
||||||
_webserver = new WebServer(getSetting(settings::WEBSERVER), false);
|
_webserver = new WebServer(getSetting(settings::WEBSERVER), false);
|
||||||
QThread *wsThread = new QThread(this);
|
QThread *wsThread = new QThread(this);
|
||||||
|
wsThread->setObjectName("WebServerThread");
|
||||||
_webserver->moveToThread(wsThread);
|
_webserver->moveToThread(wsThread);
|
||||||
connect(wsThread, &QThread::started, _webserver, &WebServer::initServer);
|
connect(wsThread, &QThread::started, _webserver, &WebServer::initServer);
|
||||||
connect(this, &HyperionDaemon::settingsChanged, _webserver, &WebServer::handleSettingsUpdate);
|
connect(this, &HyperionDaemon::settingsChanged, _webserver, &WebServer::handleSettingsUpdate);
|
||||||
@ -257,6 +260,7 @@ void HyperionDaemon::startNetworkServices()
|
|||||||
// Create SSL Webserver in thread
|
// Create SSL Webserver in thread
|
||||||
_sslWebserver = new WebServer(getSetting(settings::WEBSERVER), true);
|
_sslWebserver = new WebServer(getSetting(settings::WEBSERVER), true);
|
||||||
QThread *sslWsThread = new QThread(this);
|
QThread *sslWsThread = new QThread(this);
|
||||||
|
sslWsThread->setObjectName("SSLWebServerThread");
|
||||||
_sslWebserver->moveToThread(sslWsThread);
|
_sslWebserver->moveToThread(sslWsThread);
|
||||||
connect(sslWsThread, &QThread::started, _sslWebserver, &WebServer::initServer);
|
connect(sslWsThread, &QThread::started, _sslWebserver, &WebServer::initServer);
|
||||||
connect(this, &HyperionDaemon::settingsChanged, _sslWebserver, &WebServer::handleSettingsUpdate);
|
connect(this, &HyperionDaemon::settingsChanged, _sslWebserver, &WebServer::handleSettingsUpdate);
|
||||||
@ -265,6 +269,7 @@ void HyperionDaemon::startNetworkServices()
|
|||||||
// Create SSDP server in thread
|
// Create SSDP server in thread
|
||||||
_ssdp = new SSDPHandler(_webserver, getSetting(settings::FLATBUFSERVER).object()["port"].toInt(), getSetting(settings::JSONSERVER).object()["port"].toInt(), getSetting(settings::GENERAL).object()["name"].toString());
|
_ssdp = new SSDPHandler(_webserver, getSetting(settings::FLATBUFSERVER).object()["port"].toInt(), getSetting(settings::JSONSERVER).object()["port"].toInt(), getSetting(settings::GENERAL).object()["name"].toString());
|
||||||
QThread *ssdpThread = new QThread(this);
|
QThread *ssdpThread = new QThread(this);
|
||||||
|
ssdpThread->setObjectName("SSDPThread");
|
||||||
_ssdp->moveToThread(ssdpThread);
|
_ssdp->moveToThread(ssdpThread);
|
||||||
connect(ssdpThread, &QThread::started, _ssdp, &SSDPHandler::initServer);
|
connect(ssdpThread, &QThread::started, _ssdp, &SSDPHandler::initServer);
|
||||||
connect(_webserver, &WebServer::stateChange, _ssdp, &SSDPHandler::handleWebServerStateChange);
|
connect(_webserver, &WebServer::stateChange, _ssdp, &SSDPHandler::handleWebServerStateChange);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user