mirror of
https://github.com/tnodir/fort
synced 2024-11-15 12:56:16 +00:00
UI: RpcManager::sendCommandDataToClients: Set thread busy
This commit is contained in:
parent
04dd18d6f0
commit
b40baffe54
@ -175,7 +175,13 @@ bool ControlManager::processRequest(Control::Command command, const QVariantList
|
|||||||
OsUtil::setThreadIsBusy(true);
|
OsUtil::setThreadIsBusy(true);
|
||||||
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
const bool success = processCommand({ w, command, args, errorMessage });
|
const bool success = processCommand({
|
||||||
|
.worker = w,
|
||||||
|
.command = command,
|
||||||
|
.args = args,
|
||||||
|
.errorMessage = errorMessage,
|
||||||
|
});
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
qCWarning(LC) << "Bad command" << errorMessage << ':' << command << args;
|
qCWarning(LC) << "Bad command" << errorMessage << ':' << command << args;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <rpc/statmanagerrpc.h>
|
#include <rpc/statmanagerrpc.h>
|
||||||
#include <rpc/taskmanagerrpc.h>
|
#include <rpc/taskmanagerrpc.h>
|
||||||
#include <util/ioc/ioccontainer.h>
|
#include <util/ioc/ioccontainer.h>
|
||||||
|
#include <util/osutil.h>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -35,6 +36,8 @@ inline bool sendCommandDataToClients(
|
|||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
|
||||||
|
OsUtil::setThreadIsBusy(true);
|
||||||
|
|
||||||
for (ControlWorker *w : clients) {
|
for (ControlWorker *w : clients) {
|
||||||
if (!w->isServiceClient())
|
if (!w->isServiceClient())
|
||||||
continue;
|
continue;
|
||||||
@ -45,6 +48,8 @@ inline bool sendCommandDataToClients(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OsUtil::setThreadIsBusy(false);
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user