reader_concurrency_semaphore: allow passing name to no-limit constructor

So tests can provide names for semaphores as well, making test output
more clear.
This commit is contained in:
Botond Dénes
2020-07-23 15:42:56 +03:00
parent b4b9deadf3
commit 88129f500f

View File

@@ -144,11 +144,11 @@ public:
/// Create a semaphore with practically unlimited count and memory.
///
/// And conversely, no queue limit either.
explicit reader_concurrency_semaphore(no_limits)
explicit reader_concurrency_semaphore(no_limits, sstring name = "unlimited reader_concurrency_semaphore")
: reader_concurrency_semaphore(
std::numeric_limits<int>::max(),
std::numeric_limits<ssize_t>::max(),
"unlimited reader_concurrency_semaphore") {}
std::move(name)) {}
~reader_concurrency_semaphore();