10#include <boost/assert.hpp>
21 std::optional<std::coroutine_handle<>>
handle_;
27template <
typename T,
typename C>
29 BOOST_ASSERT(handle !=
nullptr);
34 setData(handle, (
void *)
nullptr);
35 BOOST_ASSERT(awaiter.closed_);
39 return closeHandle((uv_handle_t *)handle, uv_close);
void setData(Handle *handle, Data *data)
Definition internal_utils.h:55
Definition async_work.cc:17
void onCloseCallback(uv_handle_t *stream)
Definition close.cc:23
Promise< void > closeHandle(T *handle, C closer)
Definition close.h:28
bool await_ready() const
Definition close.cc:19
bool closed_
Definition close.h:22
bool await_suspend(std::coroutine_handle<> handle)
Definition close.cc:14
std::optional< std::coroutine_handle<> > handle_
Definition close.h:21
void await_resume()
Definition close.cc:21