mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-30 13:17:01 +00:00
" Currently we `assert(_stopped)` in the destructor, but this is too harsh, especially on freshly created semaphore instances that weren't even used yet. This basically mandates semaphores to be initialized at the end of the constructor body, which is very cumbersome. Further to that, this series relaxes the checks on destroying an unstopped previously (but not currently) used semaphore. As destroying such a semaphore without stop is risky an error is still logged. Tests: unit(dev) " * 'reader-concurrency-semaphore-relax-stop-check/v1' of https://github.com/denesb/scylla: reader_concurrency_semaphore: relax _stopped check when destroying a used semaphore reader_concurrency_semaphore: allow destroying without stop() when not used yet reader_concurrency_semaphore: add permit-stats