Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into j2735-2024-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillmartin committed Mar 25, 2024
2 parents 0dad656 + fb65791 commit b4a1345
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/tmx/TmxCore/src/MessageRouterBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ void MessageRouterBasic::broadcastMessage(MessageReceiver *sender, IvpMessage *m

//PerformanceTimer timer;

pthread_mutex_lock(&this->mMapLock);
pthread_mutex_lock(&this->mActiveBroadcastsLock);
this->mActiveBroadcasts++;
pthread_mutex_unlock(&this->mActiveBroadcastsLock);
pthread_mutex_unlock(&this->mMapLock);

int broadcastCount = 0;

Expand Down Expand Up @@ -107,7 +105,7 @@ void MessageRouterBasic::broadcastMessage(MessageReceiver *sender, IvpMessage *m
}
}
}

pthread_mutex_lock(&this->mActiveBroadcastsLock);
this->mActiveBroadcasts--;
pthread_mutex_unlock(&this->mActiveBroadcastsLock);
Expand Down
2 changes: 1 addition & 1 deletion src/tmx/TmxCore/src/MessageRouterBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MessageRouterBasic : public MessageRouter
* Keeps track of how many threads are actively inside the broadcast method in a thread safe manner (using mActiveBroadcastsLock).
* This is to allow concurrent execution of the broadcast, but give the register and unregister methods a way to tell when broadcasts are inactive.
*/
volatile int mActiveBroadcasts;
int mActiveBroadcasts;

/*!
* Used to keep the mActiveBroadcast count accurate since multiple thread's may be accessing.
Expand Down

0 comments on commit b4a1345

Please sign in to comment.