mirror of
https://github.com/matrix-construct/construct
synced 2024-06-11 06:28:55 +02:00
ircd::ctx: Convert various name character strings to string_view.
This commit is contained in:
parent
a513ba9cf3
commit
72859c650b
|
@ -62,21 +62,21 @@ struct ircd::ctx::context
|
|||
ctx *detach(); // other calls undefined after this call
|
||||
|
||||
// Note: Constructing with DETACH flag makes any further use of this object undefined.
|
||||
context(const char *const &name,
|
||||
context(const string_view &name,
|
||||
const size_t &stack_size,
|
||||
const flags &,
|
||||
function);
|
||||
|
||||
context(const char *const &name,
|
||||
context(const string_view &name,
|
||||
const size_t &stack_size,
|
||||
function,
|
||||
const flags & = (flags)0);
|
||||
|
||||
context(const char *const &name,
|
||||
context(const string_view &name,
|
||||
const flags &,
|
||||
function);
|
||||
|
||||
context(const char *const &name,
|
||||
context(const string_view &name,
|
||||
function,
|
||||
const flags & = (flags)0);
|
||||
|
||||
|
|
|
@ -921,7 +921,7 @@ ircd::ctx::context::context()
|
|||
{
|
||||
}
|
||||
|
||||
ircd::ctx::context::context(const char *const &name,
|
||||
ircd::ctx::context::context(const string_view &name,
|
||||
const size_t &stack_sz,
|
||||
const flags &flags,
|
||||
function func)
|
||||
|
@ -973,7 +973,7 @@ ircd::ctx::context::context(const char *const &name,
|
|||
spawn();
|
||||
}
|
||||
|
||||
ircd::ctx::context::context(const char *const &name,
|
||||
ircd::ctx::context::context(const string_view &name,
|
||||
const size_t &stack_size,
|
||||
function func,
|
||||
const flags &flags)
|
||||
|
@ -984,7 +984,7 @@ ircd::ctx::context::context(const char *const &name,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::ctx::context::context(const char *const &name,
|
||||
ircd::ctx::context::context(const string_view &name,
|
||||
const flags &flags,
|
||||
function func)
|
||||
:context
|
||||
|
@ -994,7 +994,7 @@ ircd::ctx::context::context(const char *const &name,
|
|||
{
|
||||
}
|
||||
|
||||
ircd::ctx::context::context(const char *const &name,
|
||||
ircd::ctx::context::context(const string_view &name,
|
||||
function func,
|
||||
const flags &flags)
|
||||
:context
|
||||
|
|
|
@ -43,7 +43,7 @@ struct ircd::ctx::ctx
|
|||
static uint64_t id_ctr; // monotonic
|
||||
|
||||
uint64_t id {++id_ctr}; // Unique runtime ID
|
||||
const char *name {nullptr}; // User given name (optional)
|
||||
string_view name; // User given name (optional)
|
||||
context::flags flags; // User given flags
|
||||
int32_t notes {0}; // norm: 0 = asleep; 1 = awake; inc by others; dec by self
|
||||
boost::asio::io_service::strand strand; // mutex/serializer
|
||||
|
@ -69,7 +69,7 @@ struct ircd::ctx::ctx
|
|||
|
||||
void operator()(boost::asio::yield_context, const std::function<void ()>) noexcept;
|
||||
|
||||
ctx(const char *const &name = "<noname>",
|
||||
ctx(const string_view &name = "<noname>"_sv,
|
||||
const size_t &stack_max = DEFAULT_STACK_SIZE,
|
||||
const context::flags &flags = (context::flags)0U,
|
||||
boost::asio::io_service &ios = ircd::ios::get())
|
||||
|
|
Loading…
Reference in a new issue