uvw  2.12.1
async.h
1 #ifndef UVW_ASYNC_INCLUDE_H
2 #define UVW_ASYNC_INCLUDE_H
3 
4 #include <uv.h>
5 #include "handle.hpp"
6 #include "loop.h"
7 
8 namespace uvw {
9 
15 struct AsyncEvent {};
16 
25 class AsyncHandle final: public Handle<AsyncHandle, uv_async_t> {
26  static void sendCallback(uv_async_t *handle);
27 
28 public:
29  using Handle::Handle;
30 
39  bool init();
40 
51  void send();
52 };
53 
54 } // namespace uvw
55 
56 #ifndef UVW_AS_LIB
57 # include "async.cpp"
58 #endif
59 
60 #endif // UVW_ASYNC_INCLUDE_H
The AsyncHandle handle.
Definition: async.h:25
bool init()
Initializes the handle.
void send()
Wakeups the event loop and emits the AsyncEvent event.
Handle base class.
Definition: handle.hpp:26
uvw default namespace.
Definition: async.h:8
AsyncEvent event.
Definition: async.h:15