6
C ++ kết thúc được gọi mà không có ngoại lệ hoạt động
Tôi đang gặp lỗi C ++ với luồng: terminate called without an active exception Aborted Đây là mã: #include <queue> #include <thread> #include <mutex> #include <condition_variable> template<typename TYPE> class blocking_stream { public: blocking_stream(size_t max_buffer_size_) : max_buffer_size(max_buffer_size_) { } //PUSH data into the buffer blocking_stream &operator<<(TYPE &other) { std::unique_lock<std::mutex> mtx_lock(mtx); while(buffer.size()>=max_buffer_size) …