Add Thread Guard for debugging simple threading issues (#4254)
* Add ThreadGuard class * Use ThreadGuard when accessing a ChannelView's messageSnapshot
This commit is contained in:
@@ -628,6 +628,7 @@ const boost::optional<MessageElementFlags> &ChannelView::getOverrideFlags()
|
||||
|
||||
LimitedQueueSnapshot<MessageLayoutPtr> &ChannelView::getMessagesSnapshot()
|
||||
{
|
||||
this->snapshotGuard_.guard();
|
||||
if (!this->paused() /*|| this->scrollBar_->isVisible()*/)
|
||||
{
|
||||
this->snapshot_ = this->messages_.getSnapshot();
|
||||
|
||||
Reference in New Issue
Block a user