thread: cleanup

This commit is contained in:
Michele Caini 2024-10-23 10:33:36 +02:00
parent f26fe9dea8
commit 32f06f4fe8

View File

@ -183,7 +183,7 @@ public:
/** /**
* @brief Runs a function once and only once. * @brief Runs a function once and only once.
* *
* The callback must be such that it's convertible to `void(*)(void)`. Free * The callback must be such that it's convertible to `void(*)()`. Free
* functions and non-capturing lambdas are both viable solutions. * functions and non-capturing lambdas are both viable solutions.
* *
* @tparam F Type of the callback. * @tparam F Type of the callback.
@ -191,7 +191,7 @@ public:
*/ */
template<typename F> template<typename F>
static void run(F &&f) noexcept { static void run(F &&f) noexcept {
using callback_type = void (*)(void); using callback_type = void (*)();
static_assert(std::is_convertible_v<F, callback_type>); static_assert(std::is_convertible_v<F, callback_type>);
callback_type cb = f; callback_type cb = f;
uv_once(guard(), cb); uv_once(guard(), cb);