| 1070 | cv.notify_all(); |
| 1071 | } |
| 1072 | void close_read() { |
| 1073 | reader_closed.store(true, std::memory_order_relaxed); |
| 1074 | cv.notify_all(); |
| 1075 | } |
| 1076 | bool read(T & output, const std::function<bool()> & should_stop) { |
| 1077 | std::unique_lock<std::mutex> lk(mutex); |
| 1078 | constexpr auto poll_interval = std::chrono::milliseconds(500); |