0
0
Fork 0
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:
Jason Volk 2020-02-27 11:12:15 -08:00
parent c1737e167c
commit 2fbb7d1521
2 changed files with 2 additions and 7 deletions

View file

@ -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

View file

@ -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