uvw  2.11.0
async.h
1 #ifndef UVW_ASYNC_INCLUDE_H
2 #define UVW_ASYNC_INCLUDE_H
3 
4 
5 #include <uv.h>
6 #include "handle.hpp"
7 #include "loop.h"
8 
9 
10 namespace uvw {
11 
12 
18 struct AsyncEvent {};
19 
20 
29 class AsyncHandle final: public Handle<AsyncHandle, uv_async_t> {
30  static void sendCallback(uv_async_t *handle);
31 
32 public:
33  using Handle::Handle;
34 
43  bool init();
44 
55  void send();
56 };
57 
58 
59 }
60 
61 
62 #ifndef UVW_AS_LIB
63 #include "async.cpp"
64 #endif
65 
66 #endif // UVW_ASYNC_INCLUDE_H
The AsyncHandle handle.
Definition: async.h:29
bool init()
Initializes the handle.
void send()
Wakeups the event loop and emits the AsyncEvent event.
Handle base class.
Definition: handle.hpp:30
uvw default namespace.
Definition: async.h:10
AsyncEvent event.
Definition: async.h:18