MCPcopy Create free account
hub / github.com/comaps/comaps / OnTaskFinished

Method OnTaskFinished

libs/drape_frontend/metaline_manager.cpp:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void MetalineManager::OnTaskFinished(std::shared_ptr<ReadMetalineTask> const & task)
60{
61 if (task->IsCancelled())
62 return;
63
64 std::lock_guard<std::mutex> lock(m_metalineCacheMutex);
65
66 if (task->UpdateCache(m_metalineCache))
67 {
68 // Notify frontend renderer.
69 LOG(LDEBUG, ("Metalines prepared:", task->GetMwmId()));
70 m_commutator->PostMessage(ThreadsCommutator::RenderThread, make_unique_dp<UpdateMetalinesMessage>(),
71 MessagePriority::Normal);
72 }
73
74 // Remove task from active ones.
75 m_activeTasks.Remove(task);
76}
77} // namespace df

Callers

nothing calls this directly

Calls 5

UpdateCacheMethod · 0.80
IsCancelledMethod · 0.45
GetMwmIdMethod · 0.45
PostMessageMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected