comparison third_party/libuv/docs/src/prepare.rst @ 160:948de3f54cea

[ThirdParty] Added libuv
author June Park <parkjune1995@gmail.com>
date Wed, 14 Jan 2026 19:39:52 -0800
parents
children
comparison
equal deleted inserted replaced
159:05cf9467a1c3 160:948de3f54cea
1
2 .. _prepare:
3
4 :c:type:`uv_prepare_t` --- Prepare handle
5 =========================================
6
7 Prepare handles will run the given callback once per loop iteration, right
8 before polling for i/o.
9
10
11 Data types
12 ----------
13
14 .. c:type:: uv_prepare_t
15
16 Prepare handle type.
17
18 .. c:type:: void (*uv_prepare_cb)(uv_prepare_t* handle)
19
20 Type definition for callback passed to :c:func:`uv_prepare_start`.
21
22
23 Public members
24 ^^^^^^^^^^^^^^
25
26 N/A
27
28 .. seealso:: The :c:type:`uv_handle_t` members also apply.
29
30
31 API
32 ---
33
34 .. c:function:: int uv_prepare_init(uv_loop_t* loop, uv_prepare_t* prepare)
35
36 Initialize the handle. This function always succeeds.
37
38 :returns: 0
39
40 .. c:function:: int uv_prepare_start(uv_prepare_t* prepare, uv_prepare_cb cb)
41
42 Start the handle with the given callback. This function always succeeds,
43 except when `cb` is `NULL`.
44
45 :returns: 0 on success, or `UV_EINVAL` when `cb == NULL`.
46
47 .. c:function:: int uv_prepare_stop(uv_prepare_t* prepare)
48
49 Stop the handle, the callback will no longer be called.
50 This function always succeeds.
51
52 :returns: 0
53
54 .. seealso:: The :c:type:`uv_handle_t` API functions also apply.