0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-19 02:51:51 +01:00

ircd::ios: Relax descriptor queued count check on dtor.

This commit is contained in:
Jason Volk 2022-04-28 19:44:05 -07:00
parent 3d2994d271
commit 42c26fbbb7

View file

@ -314,7 +314,18 @@ noexcept
ircd::ios::descriptor::~descriptor()
noexcept
{
assert(!stats || stats->queued == 0);
if(likely(stats) && unlikely(stats->queued))
log::dwarning
{
log, "descriptor(%p) '%s' still has %zu queued for execution.",
this,
name,
size_t(stats->queued),
};
// This doesn't leak if the queued object also destructs and the other
// assertions hold; the developer warning above should be sufficient.
//assert(!stats || stats->queued == 0);
assert(!stats || stats->allocs == stats->frees);
assert(!stats || stats->alloc_bytes == stats->free_bytes);
}