MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ remove()

bool MayaFlux::Yantra::OperationPool::remove ( const std::string &  name)
inline

Remove operation from pool.

Parameters
nameName of the operation to remove
Returns
true if removed, false if not found

Definition at line 182 of file OperationPool.hpp.

183 {
184 std::unique_lock lock(m_mutex);
185
186 auto it = m_operations.find(name);
187 if (it == m_operations.end()) {
188 return false;
189 }
190
191 std::type_index type = m_info[name].type;
192
193 m_operations.erase(it);
194 m_info.erase(name);
195
197 m_on_remove_callback(name, type);
198 }
199
200 return true;
201 }
std::unordered_map< std::string, PooledOperationInfo > m_info
std::unordered_map< std::string, OperationPtr > m_operations
std::function< void(const std::string &, std::type_index)> m_on_remove_callback

References m_info, m_mutex, m_on_remove_callback, and m_operations.