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:
parent
23a9589fd4
commit
2351cc071f
1 changed files with 10 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue