reader_concurrency_semaphore: add dump_diagnostics()
Allow semaphore related tests to include a diagnostics printout in error messages to help determine why the test failed.
This commit is contained in:
@@ -607,6 +607,12 @@ void reader_concurrency_semaphore::broken(std::exception_ptr ex) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string reader_concurrency_semaphore::dump_diagnostics() const {
|
||||
std::ostringstream os;
|
||||
do_dump_reader_permit_diagnostics(os, *this, *_permit_list, "user request");
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// A file that tracks the memory usage of buffers resulting from read
|
||||
// operations.
|
||||
class tracking_file_impl : public file_impl {
|
||||
|
||||
@@ -310,4 +310,6 @@ public:
|
||||
}
|
||||
|
||||
void broken(std::exception_ptr ex = {});
|
||||
|
||||
std::string dump_diagnostics() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user