0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-28 14:58:20 +02:00

ircd:Ⓜ️:acquire: Move tail cleanup to dtor.

This commit is contained in:
Jason Volk 2020-12-08 20:55:09 -08:00
parent 23a9589fd4
commit 2351cc071f

View file

@ -72,16 +72,23 @@ ircd::m::acquire::acquire::acquire(const struct opts &opts)
// Branch to acquire state
if(opts.state)
acquire_state();
}
ircd::m::acquire::~acquire()
noexcept try
{
// Complete all work before returning, otherwise everything
// will be cancelled on unwind.
while(!fetching.empty())
while(handle());
}
ircd::m::acquire::~acquire()
noexcept
catch(const ctx::interrupted &)
{
return;
}
catch(const ctx::terminated &)
{
return;
}
void