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))
|
||||
{
|
||||
QThread* hyperionThread = new QThread();
|
||||
hyperionThread->setObjectName("HyperionIManagerThread");
|
||||
Hyperion* hyperion = new Hyperion(inst);
|
||||
hyperion->moveToThread(hyperionThread);
|
||||
// setup thread management
|
||||
|
@ -47,6 +47,7 @@ void LedDeviceWrapper::createLedDevice(const QJsonObject& config)
|
||||
|
||||
// create thread and device
|
||||
QThread* thread = new QThread(this);
|
||||
thread->setObjectName("LedDeviceWrapperThread");
|
||||
_ledDevice = LedDeviceFactory::construct(config);
|
||||
_ledDevice->moveToThread(thread);
|
||||
// setup thread management
|
||||
|
@ -9,6 +9,8 @@ AmlogicWrapper::AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeig
|
||||
_thread(this),
|
||||
_grabber(grabWidth, grabHeight)
|
||||
{
|
||||
_thread.setObjectName("AmlogicWrapperThread");
|
||||
|
||||
// Connect capturing to the timeout signal of the timer
|
||||
connect(&_thread, SIGNAL (started()), this, SLOT(capture()));
|
||||
}
|
||||
|
@ -233,6 +233,7 @@ void HyperionDaemon::startNetworkServices()
|
||||
// Create FlatBuffer server in thread
|
||||
_flatBufferServer = new FlatBufferServer(getSetting(settings::FLATBUFSERVER));
|
||||
QThread *fbThread = new QThread(this);
|
||||
fbThread->setObjectName("FlatBufferServerThread");
|
||||
_flatBufferServer->moveToThread(fbThread);
|
||||
connect(fbThread, &QThread::started, _flatBufferServer, &FlatBufferServer::initServer);
|
||||
connect(this, &HyperionDaemon::settingsChanged, _flatBufferServer, &FlatBufferServer::handleSettingsUpdate);
|
||||
@ -241,6 +242,7 @@ void HyperionDaemon::startNetworkServices()
|
||||
// Create Proto server in thread
|
||||
_protoServer = new ProtoServer(getSetting(settings::PROTOSERVER));
|
||||
QThread *pThread = new QThread(this);
|
||||
pThread->setObjectName("ProtoServerThread");
|
||||
_protoServer->moveToThread(pThread);
|
||||
connect(pThread, &QThread::started, _protoServer, &ProtoServer::initServer);
|
||||
connect(this, &HyperionDaemon::settingsChanged, _protoServer, &ProtoServer::handleSettingsUpdate);
|
||||
@ -249,6 +251,7 @@ void HyperionDaemon::startNetworkServices()
|
||||
// Create Webserver in thread
|
||||
_webserver = new WebServer(getSetting(settings::WEBSERVER), false);
|
||||
QThread *wsThread = new QThread(this);
|
||||
wsThread->setObjectName("WebServerThread");
|
||||
_webserver->moveToThread(wsThread);
|
||||
connect(wsThread, &QThread::started, _webserver, &WebServer::initServer);
|
||||
connect(this, &HyperionDaemon::settingsChanged, _webserver, &WebServer::handleSettingsUpdate);
|
||||
@ -257,6 +260,7 @@ void HyperionDaemon::startNetworkServices()
|
||||
// Create SSL Webserver in thread
|
||||
_sslWebserver = new WebServer(getSetting(settings::WEBSERVER), true);
|
||||
QThread *sslWsThread = new QThread(this);
|
||||
sslWsThread->setObjectName("SSLWebServerThread");
|
||||
_sslWebserver->moveToThread(sslWsThread);
|
||||
connect(sslWsThread, &QThread::started, _sslWebserver, &WebServer::initServer);
|
||||
connect(this, &HyperionDaemon::settingsChanged, _sslWebserver, &WebServer::handleSettingsUpdate);
|
||||
@ -265,6 +269,7 @@ void HyperionDaemon::startNetworkServices()
|
||||
// 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());
|
||||
QThread *ssdpThread = new QThread(this);
|
||||
ssdpThread->setObjectName("SSDPThread");
|
||||
_ssdp->moveToThread(ssdpThread);
|
||||
connect(ssdpThread, &QThread::started, _ssdp, &SSDPHandler::initServer);
|
||||
connect(_webserver, &WebServer::stateChange, _ssdp, &SSDPHandler::handleWebServerStateChange);
|
||||
|
Loading…
Reference in New Issue
Block a user