mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 10:08:56 +02:00
ircd::ctx: Eliminate strand from ctx.
This commit is contained in:
parent
c1737e167c
commit
2fbb7d1521
|
@ -68,10 +68,6 @@ ircd::ctx::ctx::ctx(const string_view &name,
|
|||
{
|
||||
flags
|
||||
}
|
||||
,strand
|
||||
{
|
||||
ios::get()
|
||||
}
|
||||
,alarm
|
||||
{
|
||||
ios::get()
|
||||
|
@ -108,7 +104,7 @@ ircd::ctx::ctx::spawn(context::function func)
|
|||
};
|
||||
|
||||
mark(prof::event::SPAWN);
|
||||
boost::asio::spawn(strand, std::move(bound), attrs);
|
||||
boost::asio::spawn(ios::get(), std::move(bound), attrs);
|
||||
}
|
||||
|
||||
/// Base frame for a context.
|
||||
|
@ -463,7 +459,7 @@ void
|
|||
ircd::ctx::signal(ctx &ctx,
|
||||
std::function<void ()> func)
|
||||
{
|
||||
ctx.strand.post(std::move(func));
|
||||
ircd::dispatch(std::move(func));
|
||||
}
|
||||
|
||||
/// Marks `ctx` for termination. Terminate is similar to interrupt() but the
|
||||
|
|
|
@ -55,7 +55,6 @@ struct ircd::ctx::ctx
|
|||
int8_t nice {0}; // Scheduling priority nice-value
|
||||
int8_t ionice {0}; // IO priority nice-value (defaults for fs::opts)
|
||||
int32_t notes {0}; // norm: 0 = asleep; 1 = awake; inc by others; dec by self
|
||||
boost::asio::io_context::strand strand; // mutex/serializer
|
||||
boost::asio::deadline_timer alarm; // acting semaphore (64B)
|
||||
boost::asio::yield_context *yc {nullptr}; // boost interface
|
||||
continuation *cont {nullptr}; // valid when asleep; invalid when awake
|
||||
|
|
Loading…
Reference in a new issue