8 #ifndef WPIUTIL_WPI_UV_ASYNC_H_
9 #define WPIUTIL_WPI_UV_ASYNC_H_
15 #include "wpi/Signal.h"
16 #include "wpi/uv/Handle.h"
29 struct private_init {};
32 explicit Async(
const private_init&) {}
33 ~
Async() noexcept
override =
default;
40 static std::shared_ptr<Async>
Create(
Loop& loop);
47 static std::shared_ptr<Async>
Create(
const std::shared_ptr<Loop>& loop) {
68 #endif // WPIUTIL_WPI_UV_ASYNC_H_
uv_async_t * GetRaw() const noexcept
Get the underlying handle data structure.
Definition: Handle.h:261
Handle.
Definition: Handle.h:246
static std::shared_ptr< Async > Create(Loop &loop)
Create an async handle.
WPILib C++ utilities (wpiutil) namespace.
Definition: SmallString.h:21
void Send()
Wakeup the event loop and emit the event.
Definition: Async.h:57
sig::Signal wakeup
Signal generated (on event loop thread) when the async event occurs.
Definition: Async.h:62
Event loop.
Definition: Loop.h:37
static std::shared_ptr< Async > Create(const std::shared_ptr< Loop > &loop)
Create an async handle.
Definition: Async.h:47
Async handle.
Definition: Async.h:28
SignalBase is an implementation of the observer pattern, through the use of an emitting object and sl...
Definition: Signal.h:495