| 57 | } |
| 58 | |
| 59 | void 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 |
nothing calls this directly
no test coverage detected