uvw 3.1.0
Loading...
Searching...
No Matches
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
8namespace uvw {
9
11struct async_event {};
12
21class async_handle final: public handle<async_handle, uv_async_t, async_event> {
22 static void send_callback(uv_async_t *hndl);
23
24public:
25 using handle::handle;
26
35 int init() final;
36
49 int send();
50};
51
52} // namespace uvw
53
54#ifndef UVW_AS_LIB
55# include "async.cpp"
56#endif
57
58#endif // UVW_ASYNC_INCLUDE_H
The async handle.
Definition: async.h:21
int init() final
Initializes the handle.
int send()
Wakeups the event loop and emits the async event.
Handle base class.
Definition: handle.hpp:23
uvw default namespace.
Definition: async.h:8
Async event.
Definition: async.h:11