mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::ctx: Avoid any alloc for current reassertion on spawn.
This commit is contained in:
parent
09923ff758
commit
f7ecc4342b
1 changed files with 3 additions and 2 deletions
|
@ -569,9 +569,10 @@ ircd::ctx::context::context(const char *const &name,
|
|||
}
|
||||
|
||||
// The current context must be reasserted if spawn returns here
|
||||
const unwind recurrent([current(ircd::ctx::current)]
|
||||
auto *const theirs(ircd::ctx::current);
|
||||
const unwind recurrent([&theirs]
|
||||
{
|
||||
ircd::ctx::current = current;
|
||||
ircd::ctx::current = theirs;
|
||||
});
|
||||
|
||||
if(flags & DISPATCH)
|
||||
|
|
Loading…
Reference in a new issue