mirror of
https://github.com/matrix-construct/construct
synced 2024-09-29 20:28:52 +02:00
ircd::ctx: Remove the promise/state reset(): should expect assignment instead.
This commit is contained in:
parent
bc184b4d52
commit
6d0c74a064
2 changed files with 0 additions and 26 deletions
|
@ -44,7 +44,6 @@ class ircd::ctx::promise
|
|||
void set_exception(std::exception_ptr eptr);
|
||||
void set_value(const T &val);
|
||||
void set_value(T&& val);
|
||||
void reset();
|
||||
|
||||
promise();
|
||||
promise(promise &&o) noexcept = default;
|
||||
|
@ -72,7 +71,6 @@ class ircd::ctx::promise<void>
|
|||
|
||||
void set_exception(std::exception_ptr eptr);
|
||||
void set_value();
|
||||
void reset();
|
||||
|
||||
promise();
|
||||
promise(promise &&o) noexcept = default;
|
||||
|
@ -140,21 +138,6 @@ noexcept
|
|||
set_exception(std::make_exception_ptr(broken_promise()));
|
||||
}
|
||||
|
||||
inline void
|
||||
ircd::ctx::promise<void>::reset()
|
||||
{
|
||||
if(valid())
|
||||
st->reset();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void
|
||||
ircd::ctx::promise<T>::reset()
|
||||
{
|
||||
if(valid())
|
||||
st->reset();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void
|
||||
ircd::ctx::promise<T>::set_value(T&& val)
|
||||
|
|
|
@ -24,8 +24,6 @@ struct ircd::ctx::shared_state_base
|
|||
std::exception_ptr eptr;
|
||||
uint promise_refcnt {0};
|
||||
bool finished {false};
|
||||
|
||||
void reset();
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
@ -81,10 +79,3 @@ const
|
|||
{
|
||||
return this->shared_from_this();
|
||||
}
|
||||
|
||||
inline void
|
||||
ircd::ctx::shared_state_base::reset()
|
||||
{
|
||||
eptr = nullptr;
|
||||
finished = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue