forked from organicmaps/organicmaps
using separate method PacketsQueue::cancelFences for proper synchronization in TilingRenderPolicyXXX destructors
This commit is contained in:
parent
6812b25242
commit
a870cf3646
3 changed files with 9 additions and 0 deletions
|
@ -110,6 +110,9 @@ void FenceManager::cancel()
|
|||
{
|
||||
threads::MutexGuard g(m_mutex);
|
||||
|
||||
if (m_isCancelled)
|
||||
return;
|
||||
|
||||
m_isCancelled = true;
|
||||
|
||||
list<pair<int, threads::Condition*> > tempList;
|
||||
|
|
|
@ -93,6 +93,11 @@ namespace yg
|
|||
m_fenceManager.cancel();
|
||||
}
|
||||
|
||||
void PacketsQueue::cancelFences()
|
||||
{
|
||||
m_fenceManager.cancel();
|
||||
}
|
||||
|
||||
void PacketsQueue::processPacket(Packet const & packet)
|
||||
{
|
||||
if (m_packets.IsCancelled())
|
||||
|
|
|
@ -88,6 +88,7 @@ namespace yg
|
|||
|
||||
void processPacket(Packet const & packet);
|
||||
void cancel();
|
||||
void cancelFences();
|
||||
bool empty() const;
|
||||
size_t size() const;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue