MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / uv_async_init

Function uv_async_init

third-party/libuv-1.46.0/src/unix/async.c:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) {
47 int err;
48
49 err = uv__async_start(loop);
50 if (err)
51 return err;
52
53 uv__handle_init(loop, (uv_handle_t*)handle, UV_ASYNC);
54 handle->async_cb = async_cb;
55 handle->pending = 0;
56 handle->u.fd = 0; /* This will be used as a busy flag. */
57
58 uv__queue_insert_tail(&loop->async_handles, &handle->queue);
59 uv__handle_start(handle);
60
61 return 0;
62}
63
64
65int uv_async_send(uv_async_t* handle) {

Callers 3

uv__fsevents_initFunction · 0.70
uv_loop_initFunction · 0.70
uv__stream_try_selectFunction · 0.70

Calls 2

uv__async_startFunction · 0.85
uv__queue_insert_tailFunction · 0.85

Tested by

no test coverage detected