0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 15:30:52 +01: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 // Branch to acquire state
if(opts.state) if(opts.state)
acquire_state(); acquire_state();
}
ircd::m::acquire::~acquire()
noexcept try
{
// Complete all work before returning, otherwise everything // Complete all work before returning, otherwise everything
// will be cancelled on unwind. // will be cancelled on unwind.
while(!fetching.empty()) while(!fetching.empty())
while(handle()); while(handle());
} }
catch(const ctx::interrupted &)
ircd::m::acquire::~acquire()
noexcept
{ {
return;
}
catch(const ctx::terminated &)
{
return;
} }
void void