| 205 | } |
| 206 | |
| 207 | static void detach_threads(const std::string& key) |
| 208 | { |
| 209 | auto find = m_threads_map.find(key); |
| 210 | if (find == m_threads_map.end()) |
| 211 | return; |
| 212 | |
| 213 | for (std::thread& thread : find->second) |
| 214 | if (thread.joinable()) |
| 215 | thread.detach(); |
| 216 | } |
| 217 | |
| 218 | /** |
| 219 | * Adds a dependecy on 'dependency_key' from 'key' such that all the threads started with key |