mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
ircd::ios: Assume direct dispatch; use epoch continuation closure.
This commit is contained in:
parent
f16eb0b558
commit
2381f07d2f
1 changed files with 11 additions and 11 deletions
22
ircd/ios.cc
22
ircd/ios.cc
|
@ -410,20 +410,20 @@ ircd::ios::dispatch::dispatch(descriptor &descriptor,
|
|||
synchronous_t,
|
||||
const std::function<void ()> &function)
|
||||
{
|
||||
const ctx::uninterruptible::nothrow ui;
|
||||
const ctx::uninterruptible ui;
|
||||
|
||||
ctx::latch latch(1);
|
||||
dispatch(descriptor, [&function, &latch]
|
||||
assert(function);
|
||||
ctx::continuation
|
||||
{
|
||||
const unwind uw{[&latch]
|
||||
continuation::false_predicate, continuation::noop_interruptor, [&descriptor, &function]
|
||||
(auto &yield)
|
||||
{
|
||||
latch.count_down();
|
||||
}};
|
||||
|
||||
function();
|
||||
});
|
||||
|
||||
latch.wait();
|
||||
dispatch(descriptor, [&function]
|
||||
{
|
||||
function();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[[gnu::hot]]
|
||||
|
|
Loading…
Reference in a new issue