File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323#include " wmswitcher1adaptor.h"
2424#include " org_freedesktop_systemd1_Manager.h"
2525#include " utils/fifo.h"
26- #include " utils/utils.h"
2726#include " impl/sessionmanager.h"
2827#include " impl/wmswitcher.h"
2928#include " impl/iowait/iowaitwatcher.h"
@@ -101,7 +100,7 @@ int main(int argc, char *argv[])
101100 qApp->quit ();
102101 });
103102 pid_t curPid = getpid ();
104- QtConcurrent::run ( [curPid](){
103+ QThreadPool::globalInstance ()-> start ( [curPid]() {
105104 qInfo ()<<" leader pipe thread id: " << QThread::currentThreadId () << " , pid: " << curPid;
106105 Fifo *fifo = new Fifo;
107106 fifo->OpenWrite ();
@@ -129,7 +128,7 @@ int main(int argc, char *argv[])
129128 QDBusConnection::sessionBus ().registerObject (" /org/deepin/dde/WMSwitcher1" , wmSwitcher);
130129
131130 // TODO 这部分都是一次性运行,可以拆分成不同的oneshot服务
132- QtConcurrent::run ([] {
131+ QThreadPool::globalInstance ()-> start ([] {
133132 OthersManager ().init ();
134133 });
135134
@@ -146,7 +145,7 @@ int main(int argc, char *argv[])
146145#endif
147146 qInfo () << " iowait watcher disabled" ;
148147
149- QtConcurrent::run ( [&session](){
148+ QThreadPool::globalInstance ()-> start ( [&session]() {
150149 qInfo ()<< " systemd service pipe thread id: " << QThread::currentThreadId ();
151150 Fifo *fifo = new Fifo;
152151 fifo->OpenRead ();
You can’t perform that action at this time.
0 commit comments