mirror of
https://github.com/matrix-construct/construct
synced 2025-04-29 13:04:17 +02:00
ircd::ctx: Add future<void> already-ready constructor.
This commit is contained in:
parent
f5904dc69d
commit
ee48df71a8
1 changed files with 10 additions and 1 deletions
|
@ -85,8 +85,11 @@ struct ircd::ctx::future<void>
|
|||
template<class duration> future_status wait(const duration &d) const;
|
||||
void wait() const;
|
||||
|
||||
future() = default;
|
||||
IRCD_OVERLOAD(already)
|
||||
|
||||
future(promise<void> &promise);
|
||||
future(already_t); // construct in ready state
|
||||
future() = default;
|
||||
future(future &&) noexcept;
|
||||
future(const future &) = delete;
|
||||
future &operator=(future &&) noexcept;
|
||||
|
@ -145,6 +148,12 @@ ircd::ctx::future<void>::future(promise<void> &promise)
|
|||
assert(promise.st);
|
||||
}
|
||||
|
||||
inline
|
||||
ircd::ctx::future<void>::future(already_t)
|
||||
{
|
||||
set_ready(st);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
ircd::ctx::future<T>::future(future<T> &&o)
|
||||
noexcept
|
||||
|
|
Loading…
Add table
Reference in a new issue