карта блок-в. Блокировка правильная. Множ. доступ

This commit is contained in:
2026-01-21 15:44:01 +03:00
parent fe75f2c6ca
commit 2772c3aaba
26 changed files with 146 additions and 91 deletions

View File

@@ -44,7 +44,7 @@ void UpdateController::initialize(CommonClientHandler *commonClientHandler,DataP
void UpdateController::changeAssetVersion(QString versionName)
{
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
qDebug() << "UpdateController thread ID " << QThread::currentThreadId();
currentStreamingPath = assetManager->setVersion(versionName);
setUpCurrentServerHash();
@@ -52,21 +52,21 @@ void UpdateController::changeAssetVersion(QString versionName)
commonClientHandler->slot_sendPacketToAllClients(PacketType::HASH_READY);
commonClientHandler->sendCurrentVersionToAllClient();
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
}
void UpdateController::createCopyVersion(QString versionName,QString newVersionName,QString author)
{
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
assetManager->createCopyVersion(versionName,newVersionName,author);
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
}
void UpdateController::deleteAssetVersion(QString versionName)
{
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
assetManager->deleteVersion(versionName);
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
}
void UpdateController::compareFiles(ClientHandler* handler, QByteArray array)
@@ -94,7 +94,8 @@ void UpdateController::calculateFullHash()
QElapsedTimer timer;
timer.start();
qDebug() << "Start calculate... ";
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
bool res = emit signal_BlockAutorization(true, "SERVER", "CalculateFullHash");
//auto *list = calculateHash(buildPath);
hashCalculator->calculateHashes(buildPath);
@@ -104,8 +105,8 @@ void UpdateController::calculateFullHash()
calculateSharedHash();
Logger::instance().log("Calculate hash complete");
qDebug() << "Calculate time " << timer.elapsed();
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
res = emit signal_BlockAutorization(false, "SERVER", "CalculateFullHash");
}
void UpdateController::calculateFullHashWithSetup()