test-threadpool-cancel.c
Go to the documentation of this file.
1 /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to
5  * deal in the Software without restriction, including without limitation the
6  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7  * sell copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions:
9  *
10  * The above copyright notice and this permission notice shall be included in
11  * all copies or substantial portions of the Software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19  * IN THE SOFTWARE.
20  */
21 
22 #include "uv.h"
23 #include "task.h"
24 
25 #define INIT_CANCEL_INFO(ci, what) \
26  do { \
27  (ci)->reqs = (what); \
28  (ci)->nreqs = ARRAY_SIZE(what); \
29  (ci)->stride = sizeof((what)[0]); \
30  } \
31  while (0)
32 
33 struct cancel_info {
34  void* reqs;
35  unsigned nreqs;
36  unsigned stride;
38 };
39 
40 struct random_info {
42  char buf[1];
43 };
44 
45 static unsigned fs_cb_called;
46 static unsigned done_cb_called;
47 static unsigned done2_cb_called;
48 static unsigned timer_cb_called;
51 
52 
53 static void work_cb(uv_work_t* req) {
55 }
56 
57 
58 static void done_cb(uv_work_t* req, int status) {
60 }
61 
62 
63 static void saturate_threadpool(void) {
64  uv_loop_t* loop;
65  char buf[64];
66  size_t i;
67 
68  snprintf(buf,
69  sizeof(buf),
70  "UV_THREADPOOL_SIZE=%lu",
71  (unsigned long)ARRAY_SIZE(pause_reqs));
72  putenv(buf);
73 
75  for (i = 0; i < ARRAY_SIZE(pause_reqs); i += 1) {
76  ASSERT(0 == uv_sem_init(pause_sems + i, 0));
78  }
79 }
80 
81 
82 static void unblock_threadpool(void) {
83  size_t i;
84 
85  for (i = 0; i < ARRAY_SIZE(pause_reqs); i += 1)
87 }
88 
89 
90 static void fs_cb(uv_fs_t* req) {
91  ASSERT(req->result == UV_ECANCELED);
93  fs_cb_called++;
94 }
95 
96 
98  int status,
99  struct addrinfo* res) {
100  ASSERT(status == UV_EAI_CANCELED);
101  ASSERT(res == NULL);
102  uv_freeaddrinfo(res); /* Should not crash. */
103 }
104 
105 
107  int status,
108  const char* hostname,
109  const char* service) {
110  ASSERT(status == UV_EAI_CANCELED);
111  ASSERT(hostname == NULL);
112  ASSERT(service == NULL);
113 }
114 
115 
116 static void work2_cb(uv_work_t* req) {
117  ASSERT(0 && "work2_cb called");
118 }
119 
120 
121 static void done2_cb(uv_work_t* req, int status) {
122  ASSERT(status == UV_ECANCELED);
123  done2_cb_called++;
124 }
125 
126 
127 static void timer_cb(uv_timer_t* handle) {
128  struct cancel_info* ci;
129  uv_req_t* req;
130  unsigned i;
131 
133 
134  for (i = 0; i < ci->nreqs; i++) {
135  req = (uv_req_t*) ((char*) ci->reqs + i * ci->stride);
136  ASSERT(0 == uv_cancel(req));
137  }
138 
139  uv_close((uv_handle_t*) &ci->timer_handle, NULL);
141  timer_cb_called++;
142 }
143 
144 
145 static void nop_done_cb(uv_work_t* req, int status) {
146  ASSERT(status == UV_ECANCELED);
147  done_cb_called++;
148 }
149 
150 
151 static void nop_random_cb(uv_random_t* req, int status, void* buf, size_t len) {
152  struct random_info* ri;
153 
154  ri = container_of(req, struct random_info, random_req);
155 
156  ASSERT(status == UV_ECANCELED);
157  ASSERT(buf == (void*) ri->buf);
158  ASSERT(len == sizeof(ri->buf));
159 
160  done_cb_called++;
161 }
162 
163 
164 TEST_IMPL(threadpool_cancel_getaddrinfo) {
166  struct cancel_info ci;
167  struct addrinfo hints;
168  uv_loop_t* loop;
169  int r;
170 
171  INIT_CANCEL_INFO(&ci, reqs);
172  loop = uv_default_loop();
174 
175  r = uv_getaddrinfo(loop, reqs + 0, getaddrinfo_cb, "fail", NULL, NULL);
176  ASSERT(r == 0);
177 
178  r = uv_getaddrinfo(loop, reqs + 1, getaddrinfo_cb, NULL, "fail", NULL);
179  ASSERT(r == 0);
180 
181  r = uv_getaddrinfo(loop, reqs + 2, getaddrinfo_cb, "fail", "fail", NULL);
182  ASSERT(r == 0);
183 
184  r = uv_getaddrinfo(loop, reqs + 3, getaddrinfo_cb, "fail", NULL, &hints);
185  ASSERT(r == 0);
186 
188  ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
190  ASSERT(1 == timer_cb_called);
191 
193  return 0;
194 }
195 
196 
197 TEST_IMPL(threadpool_cancel_getnameinfo) {
199  struct sockaddr_in addr4;
200  struct cancel_info ci;
201  uv_loop_t* loop;
202  int r;
203 
204  r = uv_ip4_addr("127.0.0.1", 80, &addr4);
205  ASSERT(r == 0);
206 
207  INIT_CANCEL_INFO(&ci, reqs);
208  loop = uv_default_loop();
210 
211  r = uv_getnameinfo(loop, reqs + 0, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
212  ASSERT(r == 0);
213 
214  r = uv_getnameinfo(loop, reqs + 1, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
215  ASSERT(r == 0);
216 
217  r = uv_getnameinfo(loop, reqs + 2, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
218  ASSERT(r == 0);
219 
220  r = uv_getnameinfo(loop, reqs + 3, getnameinfo_cb, (const struct sockaddr*)&addr4, 0);
221  ASSERT(r == 0);
222 
224  ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
226  ASSERT(1 == timer_cb_called);
227 
229  return 0;
230 }
231 
232 
233 TEST_IMPL(threadpool_cancel_random) {
234  struct random_info req;
235  uv_loop_t* loop;
236 
238  loop = uv_default_loop();
239  ASSERT(0 == uv_random(loop,
240  &req.random_req,
241  &req.buf,
242  sizeof(req.buf),
243  0,
244  nop_random_cb));
245  ASSERT(0 == uv_cancel((uv_req_t*) &req));
246  ASSERT(0 == done_cb_called);
249  ASSERT(1 == done_cb_called);
250 
252  return 0;
253 }
254 
255 
256 TEST_IMPL(threadpool_cancel_work) {
257  struct cancel_info ci;
258  uv_work_t reqs[16];
259  uv_loop_t* loop;
260  unsigned i;
261 
262  INIT_CANCEL_INFO(&ci, reqs);
263  loop = uv_default_loop();
265 
266  for (i = 0; i < ARRAY_SIZE(reqs); i++)
268 
270  ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
272  ASSERT(1 == timer_cb_called);
274 
276  return 0;
277 }
278 
279 
280 TEST_IMPL(threadpool_cancel_fs) {
281  struct cancel_info ci;
282  uv_fs_t reqs[26];
283  uv_loop_t* loop;
284  unsigned n;
285  uv_buf_t iov;
286 
287  INIT_CANCEL_INFO(&ci, reqs);
288  loop = uv_default_loop();
290  iov = uv_buf_init(NULL, 0);
291 
292  /* Needs to match ARRAY_SIZE(fs_reqs). */
293  n = 0;
294  ASSERT(0 == uv_fs_chmod(loop, reqs + n++, "/", 0, fs_cb));
295  ASSERT(0 == uv_fs_chown(loop, reqs + n++, "/", 0, 0, fs_cb));
296  ASSERT(0 == uv_fs_close(loop, reqs + n++, 0, fs_cb));
297  ASSERT(0 == uv_fs_fchmod(loop, reqs + n++, 0, 0, fs_cb));
298  ASSERT(0 == uv_fs_fchown(loop, reqs + n++, 0, 0, 0, fs_cb));
299  ASSERT(0 == uv_fs_fdatasync(loop, reqs + n++, 0, fs_cb));
300  ASSERT(0 == uv_fs_fstat(loop, reqs + n++, 0, fs_cb));
301  ASSERT(0 == uv_fs_fsync(loop, reqs + n++, 0, fs_cb));
302  ASSERT(0 == uv_fs_ftruncate(loop, reqs + n++, 0, 0, fs_cb));
303  ASSERT(0 == uv_fs_futime(loop, reqs + n++, 0, 0, 0, fs_cb));
304  ASSERT(0 == uv_fs_link(loop, reqs + n++, "/", "/", fs_cb));
305  ASSERT(0 == uv_fs_lstat(loop, reqs + n++, "/", fs_cb));
306  ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb));
307  ASSERT(0 == uv_fs_open(loop, reqs + n++, "/", 0, 0, fs_cb));
308  ASSERT(0 == uv_fs_read(loop, reqs + n++, 0, &iov, 1, 0, fs_cb));
309  ASSERT(0 == uv_fs_scandir(loop, reqs + n++, "/", 0, fs_cb));
310  ASSERT(0 == uv_fs_readlink(loop, reqs + n++, "/", fs_cb));
311  ASSERT(0 == uv_fs_realpath(loop, reqs + n++, "/", fs_cb));
312  ASSERT(0 == uv_fs_rename(loop, reqs + n++, "/", "/", fs_cb));
313  ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb));
314  ASSERT(0 == uv_fs_sendfile(loop, reqs + n++, 0, 0, 0, 0, fs_cb));
315  ASSERT(0 == uv_fs_stat(loop, reqs + n++, "/", fs_cb));
316  ASSERT(0 == uv_fs_symlink(loop, reqs + n++, "/", "/", 0, fs_cb));
317  ASSERT(0 == uv_fs_unlink(loop, reqs + n++, "/", fs_cb));
318  ASSERT(0 == uv_fs_utime(loop, reqs + n++, "/", 0, 0, fs_cb));
319  ASSERT(0 == uv_fs_write(loop, reqs + n++, 0, &iov, 1, 0, fs_cb));
320  ASSERT(n == ARRAY_SIZE(reqs));
321 
323  ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0));
325  ASSERT(n == fs_cb_called);
326  ASSERT(1 == timer_cb_called);
327 
328 
330  return 0;
331 }
332 
333 
334 TEST_IMPL(threadpool_cancel_single) {
335  uv_loop_t* loop;
336  uv_work_t req;
337 
339  loop = uv_default_loop();
340  ASSERT(0 == uv_queue_work(loop, &req, (uv_work_cb) abort, nop_done_cb));
341  ASSERT(0 == uv_cancel((uv_req_t*) &req));
342  ASSERT(0 == done_cb_called);
345  ASSERT(1 == done_cb_called);
346 
348  return 0;
349 }
async_greeter_server_with_graceful_shutdown.loop
loop
Definition: async_greeter_server_with_graceful_shutdown.py:59
reqs
static uv_udp_send_t reqs[ARRAY_SIZE(sockets)]
Definition: test-watcher-cross-stop.c:36
ARRAY_SIZE
#define ARRAY_SIZE(array)
Definition: bloaty.cc:101
uv_fs_open
UV_EXTERN int uv_fs_open(uv_loop_t *loop, uv_fs_t *req, const char *path, int flags, int mode, uv_fs_cb cb)
Definition: unix/fs.c:1812
task.h
done_cb
static void done_cb(uv_work_t *req, int status)
Definition: test-threadpool-cancel.c:58
uv_fs_symlink
UV_EXTERN int uv_fs_symlink(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, int flags, uv_fs_cb cb)
Definition: unix/fs.c:1961
done2_cb
static void done2_cb(uv_work_t *req, int status)
Definition: test-threadpool-cancel.c:121
random_info::random_req
uv_random_t random_req
Definition: test-threadpool-cancel.c:41
TEST_IMPL
TEST_IMPL(threadpool_cancel_getaddrinfo)
Definition: test-threadpool-cancel.c:164
uv_fs_stat
UV_EXTERN int uv_fs_stat(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
Definition: unix/fs.c:1954
uv_getaddrinfo_s
Definition: uv.h:871
uv_fs_sendfile
UV_EXTERN int uv_fs_sendfile(uv_loop_t *loop, uv_fs_t *req, uv_file out_fd, uv_file in_fd, int64_t in_offset, size_t length, uv_fs_cb cb)
Definition: unix/fs.c:1938
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
uv_fs_readlink
UV_EXTERN int uv_fs_readlink(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
Definition: unix/fs.c:1900
ASSERT
#define ASSERT(expr)
Definition: task.h:102
status
absl::Status status
Definition: rls.cc:251
uv_getnameinfo_s
Definition: uv.h:894
done2_cb_called
static unsigned done2_cb_called
Definition: test-threadpool-cancel.c:47
pause_sems
static uv_sem_t pause_sems[ARRAY_SIZE(pause_reqs)]
Definition: test-threadpool-cancel.c:50
uv_run
UV_EXTERN int uv_run(uv_loop_t *, uv_run_mode mode)
Definition: unix/core.c:361
container_of
#define container_of(ptr, type, member)
Definition: uv-common.h:57
uv_queue_work
UV_EXTERN int uv_queue_work(uv_loop_t *loop, uv_work_t *req, uv_work_cb work_cb, uv_after_work_cb after_work_cb)
Definition: threadpool.c:338
uv_fs_s
Definition: uv.h:1294
uv_fs_mkdir
UV_EXTERN int uv_fs_mkdir(uv_loop_t *loop, uv_fs_t *req, const char *path, int mode, uv_fs_cb cb)
Definition: unix/fs.c:1776
work2_cb
static void work2_cb(uv_work_t *req)
Definition: test-threadpool-cancel.c:116
uv_fs_futime
UV_EXTERN int uv_fs_futime(uv_loop_t *loop, uv_fs_t *req, uv_file file, double atime, double mtime, uv_fs_cb cb)
Definition: unix/fs.c:1731
work_cb
static void work_cb(uv_work_t *req)
Definition: test-threadpool-cancel.c:53
uv_close
UV_EXTERN void uv_close(uv_handle_t *handle, uv_close_cb close_cb)
Definition: unix/core.c:112
uv_random_s
Definition: uv.h:1631
iov
static uv_buf_t iov
Definition: libuv/docs/code/uvcat/main.c:15
uv_ip4_addr
UV_EXTERN int uv_ip4_addr(const char *ip, int port, struct sockaddr_in *addr)
Definition: uv-common.c:221
uv_fs_unlink
UV_EXTERN int uv_fs_unlink(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
Definition: unix/fs.c:1974
uv_getnameinfo
UV_EXTERN int uv_getnameinfo(uv_loop_t *loop, uv_getnameinfo_t *req, uv_getnameinfo_cb getnameinfo_cb, const struct sockaddr *addr, int flags)
Definition: unix/getnameinfo.c:81
cancel_info::timer_handle
uv_timer_t timer_handle
Definition: test-threadpool-cancel.c:37
uv_default_loop
UV_EXTERN uv_loop_t * uv_default_loop(void)
Definition: uv-common.c:733
done_cb_called
static unsigned done_cb_called
Definition: test-threadpool-cancel.c:46
req
static uv_connect_t req
Definition: test-connection-fail.c:30
UV_RUN_DEFAULT
@ UV_RUN_DEFAULT
Definition: uv.h:254
getnameinfo_cb
static void getnameinfo_cb(uv_getnameinfo_t *handle, int status, const char *hostname, const char *service)
Definition: test-threadpool-cancel.c:106
nop_done_cb
static void nop_done_cb(uv_work_t *req, int status)
Definition: test-threadpool-cancel.c:145
saturate_threadpool
static void saturate_threadpool(void)
Definition: test-threadpool-cancel.c:63
uv_fs_fsync
UV_EXTERN int uv_fs_fsync(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
Definition: unix/fs.c:1712
uv_fs_fchmod
UV_EXTERN int uv_fs_fchmod(uv_loop_t *loop, uv_fs_t *req, uv_file file, int mode, uv_fs_cb cb)
Definition: unix/fs.c:1658
uv_fs_fdatasync
UV_EXTERN int uv_fs_fdatasync(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
Definition: unix/fs.c:1698
random_info
Definition: test-threadpool-cancel.c:40
uv_sem_t
UV_PLATFORM_SEM_T uv_sem_t
Definition: unix.h:137
uv_timer_s
Definition: uv.h:850
uv_fs_close
UV_EXTERN int uv_fs_close(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
Definition: unix/fs.c:1651
pause_reqs
static uv_work_t pause_reqs[4]
Definition: test-threadpool-cancel.c:49
n
int n
Definition: abseil-cpp/absl/container/btree_test.cc:1080
uv_sem_post
UV_EXTERN void uv_sem_post(uv_sem_t *sem)
Definition: libuv/src/unix/thread.c:669
uv_fs_scandir
UV_EXTERN int uv_fs_scandir(uv_loop_t *loop, uv_fs_t *req, const char *path, int flags, uv_fs_cb cb)
Definition: unix/fs.c:1854
getaddrinfo_cb
static void getaddrinfo_cb(uv_getaddrinfo_t *req, int status, struct addrinfo *res)
Definition: test-threadpool-cancel.c:97
uv_freeaddrinfo
UV_EXTERN void uv_freeaddrinfo(struct addrinfo *ai)
Definition: unix/getaddrinfo.c:223
uv_fs_utime
UV_EXTERN int uv_fs_utime(uv_loop_t *loop, uv_fs_t *req, const char *path, double atime, double mtime, uv_fs_cb cb)
Definition: unix/fs.c:1981
uv_sem_init
UV_EXTERN int uv_sem_init(uv_sem_t *sem, unsigned int value)
Definition: libuv/src/unix/thread.c:649
uv_work_cb
void(* uv_work_cb)(uv_work_t *req)
Definition: uv.h:326
uv_fs_chmod
UV_EXTERN int uv_fs_chmod(uv_loop_t *loop, uv_fs_t *req, const char *path, int mode, uv_fs_cb cb)
Definition: unix/fs.c:1625
cancel_info::nreqs
unsigned nreqs
Definition: test-threadpool-cancel.c:35
addr4
static struct sockaddr_in addr4
Definition: test-getnameinfo.c:33
uv_fs_read
UV_EXTERN int uv_fs_read(uv_loop_t *loop, uv_fs_t *req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
Definition: unix/fs.c:1826
uv.h
MAKE_VALGRIND_HAPPY
#define MAKE_VALGRIND_HAPPY()
Definition: task.h:229
uv_fs_ftruncate
UV_EXTERN int uv_fs_ftruncate(uv_loop_t *loop, uv_fs_t *req, uv_file file, int64_t offset, uv_fs_cb cb)
Definition: unix/fs.c:1719
uv_fs_fchown
UV_EXTERN int uv_fs_fchown(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
Definition: unix/fs.c:1670
uv_buf_t
Definition: unix.h:121
timer_cb
static void timer_cb(uv_timer_t *handle)
Definition: test-threadpool-cancel.c:127
uv_random
UV_EXTERN int uv_random(uv_loop_t *loop, uv_random_t *req, void *buf, size_t buflen, unsigned flags, uv_random_cb cb)
Definition: libuv/src/random.c:94
random_info::buf
char buf[1]
Definition: test-threadpool-cancel.c:42
fs_cb
static void fs_cb(uv_fs_t *req)
Definition: test-threadpool-cancel.c:90
uv_sem_destroy
UV_EXTERN void uv_sem_destroy(uv_sem_t *sem)
Definition: libuv/src/unix/thread.c:661
uv_fs_write
UV_EXTERN int uv_fs_write(uv_loop_t *loop, uv_fs_t *req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t offset, uv_fs_cb cb)
Definition: unix/fs.c:1995
fix_build_deps.r
r
Definition: fix_build_deps.py:491
uv_fs_link
UV_EXTERN int uv_fs_link(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, uv_fs_cb cb)
Definition: unix/fs.c:1765
uv_fs_chown
UV_EXTERN int uv_fs_chown(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
Definition: unix/fs.c:1637
timer_cb_called
static unsigned timer_cb_called
Definition: test-threadpool-cancel.c:48
cancel_info
Definition: test-threadpool-cancel.c:33
uv_fs_rename
UV_EXTERN int uv_fs_rename(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, uv_fs_cb cb)
Definition: unix/fs.c:1920
uv_buf_init
UV_EXTERN uv_buf_t uv_buf_init(char *base, unsigned int len)
Definition: uv-common.c:157
cancel_info::reqs
void * reqs
Definition: test-threadpool-cancel.c:34
uv_fs_realpath
UV_EXTERN int uv_fs_realpath(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
Definition: unix/fs.c:1910
uv_getaddrinfo
UV_EXTERN int uv_getaddrinfo(uv_loop_t *loop, uv_getaddrinfo_t *req, uv_getaddrinfo_cb getaddrinfo_cb, const char *node, const char *service, const struct addrinfo *hints)
Definition: unix/getaddrinfo.c:141
uv_fs_req_cleanup
UV_EXTERN void uv_fs_req_cleanup(uv_fs_t *req)
Definition: unix/fs.c:2024
handle
static csh handle
Definition: test_arm_regression.c:16
uv_handle_s
Definition: uv.h:441
uv_timer_start
UV_EXTERN int uv_timer_start(uv_timer_t *handle, uv_timer_cb cb, uint64_t timeout, uint64_t repeat)
Definition: timer.c:66
uv_loop_s
Definition: uv.h:1767
uv_sem_wait
UV_EXTERN void uv_sem_wait(uv_sem_t *sem)
Definition: libuv/src/unix/thread.c:677
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
uv_timer_init
UV_EXTERN int uv_timer_init(uv_loop_t *, uv_timer_t *handle)
Definition: timer.c:58
service
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
Definition: ProtoMethod.h:25
timer_handle
static uv_timer_t timer_handle
Definition: benchmark-loop-count.c:32
uv_cancel
UV_EXTERN int uv_cancel(uv_req_t *req)
Definition: threadpool.c:358
uv_work_s
Definition: uv.h:1055
uv_fs_lstat
UV_EXTERN int uv_fs_lstat(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
Definition: unix/fs.c:1758
INIT_CANCEL_INFO
#define INIT_CANCEL_INFO(ci, what)
Definition: test-threadpool-cancel.c:25
nop_random_cb
static void nop_random_cb(uv_random_t *req, int status, void *buf, size_t len)
Definition: test-threadpool-cancel.c:151
fs_cb_called
static unsigned fs_cb_called
Definition: test-threadpool-cancel.c:45
addrinfo
Definition: ares_ipv6.h:43
uv_req_s
Definition: uv.h:404
uv_fs_fstat
UV_EXTERN int uv_fs_fstat(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
Definition: unix/fs.c:1705
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
cancel_info::stride
unsigned stride
Definition: test-threadpool-cancel.c:36
unblock_threadpool
static void unblock_threadpool(void)
Definition: test-threadpool-cancel.c:82


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:27