| 24 | **/ |
| 25 | template <class... Args> |
| 26 | void push(Args&&... args) { |
| 27 | { |
| 28 | std::scoped_lock lock{mutex_}; |
| 29 | queue_.emplace(std::forward<Args>(args)...); |
| 30 | } |
| 31 | ready_.notify_one(); |
| 32 | } |
| 33 | /** |
| 34 | * pop() waits until an item is available in the queue, pops it out and |
| 35 | *assigns it to the "out" parameter. |