| 20 | public: |
| 21 | template <typename Fn> |
| 22 | void ProcessList(Fn const & fn) |
| 23 | { |
| 24 | std::unique_lock lock(m_condLock); |
| 25 | |
| 26 | bool const hadElements = !m_list.empty(); |
| 27 | |
| 28 | fn(m_list); |
| 29 | |
| 30 | bool const hasElements = !m_list.empty(); |
| 31 | |
| 32 | if (!hadElements && hasElements) |
| 33 | m_Cond.notify_all(); |
| 34 | } |
| 35 | |
| 36 | void PushBack(T const & t) |
| 37 | { |