mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:16:51 +02:00
deadlock 101
This commit is contained in:
parent
b65cdd2865
commit
09701fdcf1
1 changed files with 16 additions and 9 deletions
|
@ -1460,15 +1460,22 @@ void OctreeServer::didCallWriteDatagram(OctreeSendThread* thread) {
|
||||||
|
|
||||||
|
|
||||||
void OctreeServer::stopTrackingThread(OctreeSendThread* thread) {
|
void OctreeServer::stopTrackingThread(OctreeSendThread* thread) {
|
||||||
QMutexLocker lockerA(&_threadsDidProcessMutex);
|
{
|
||||||
QMutexLocker lockerB(&_threadsDidPacketDistributorMutex);
|
QMutexLocker locker(&_threadsDidProcessMutex);
|
||||||
QMutexLocker lockerC(&_threadsDidHandlePacketSendMutex);
|
_threadsDidProcess.remove(thread);
|
||||||
QMutexLocker lockerD(&_threadsDidCallWriteDatagramMutex);
|
}
|
||||||
|
{
|
||||||
_threadsDidProcess.remove(thread);
|
QMutexLocker locker(&_threadsDidPacketDistributorMutex);
|
||||||
_threadsDidPacketDistributor.remove(thread);
|
_threadsDidPacketDistributor.remove(thread);
|
||||||
_threadsDidHandlePacketSend.remove(thread);
|
}
|
||||||
_threadsDidCallWriteDatagram.remove(thread);
|
{
|
||||||
|
QMutexLocker locker(&_threadsDidHandlePacketSendMutex);
|
||||||
|
_threadsDidHandlePacketSend.remove(thread);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
QMutexLocker locker(&_threadsDidCallWriteDatagramMutex);
|
||||||
|
_threadsDidCallWriteDatagram.remove(thread);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int howManyThreadsDidSomething(QMutex& mutex, QMap<OctreeSendThread*, quint64>& something, quint64 since) {
|
int howManyThreadsDidSomething(QMutex& mutex, QMap<OctreeSendThread*, quint64>& something, quint64 since) {
|
||||||
|
|
Loading…
Reference in a new issue