reader_permit: signal leaked resources

When destroying a permit with leaked resources we call
`on_internal_error_noexcept()` in the destructor. This method logs an
error or asserts depending on the configuration. When not asserting, we
need to return the leaked units to the semaphore, otherwise they will be
leaked for good. We can do this because we know exactly how many
resources the user of the permit leaked (never signalled).
This commit is contained in:
Botond Dénes
2021-03-17 15:18:54 +02:00
parent 0f1a72ba59
commit d64b1fdd6a

View File

@@ -101,6 +101,7 @@ public:
_op_name_view,
_resources.count,
_resources.memory));
signal(_resources);
}
}