Remove all operations of a specific type.
210 {
211 std::unique_lock lock(
m_mutex);
212
213 std::type_index target_type(typeid(OpClass));
214 std::vector<std::string> to_remove;
215
216 for (
const auto& [name, info] :
m_info) {
217 if (info.type == target_type) {
218 to_remove.push_back(name);
219 }
220 }
221
222 for (const auto& name : to_remove) {
225
228 }
229 }
230
231 return to_remove.size();
232 }
std::shared_mutex m_mutex
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