Mercurial
annotate third_party/libuv/docs/code/uvstop/main.c @ 279:b3b547563ec7
Add Google connector service and agent wiki
Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 22:22:36 -0700 |
| parents | 948de3f54cea |
| children |
| rev | line source |
|---|---|
| 160 | 1 #include <stdio.h> |
| 2 #include <uv.h> | |
| 3 | |
| 4 int64_t counter = 0; | |
| 5 | |
| 6 void idle_cb(uv_idle_t *handle) { | |
| 7 printf("Idle callback\n"); | |
| 8 counter++; | |
| 9 | |
| 10 if (counter >= 5) { | |
| 11 uv_stop(uv_default_loop()); | |
| 12 printf("uv_stop() called\n"); | |
| 13 } | |
| 14 } | |
| 15 | |
| 16 void prep_cb(uv_prepare_t *handle) { | |
| 17 printf("Prep callback\n"); | |
| 18 } | |
| 19 | |
| 20 int main() { | |
| 21 uv_idle_t idler; | |
| 22 uv_prepare_t prep; | |
| 23 | |
| 24 uv_idle_init(uv_default_loop(), &idler); | |
| 25 uv_idle_start(&idler, idle_cb); | |
| 26 | |
| 27 uv_prepare_init(uv_default_loop(), &prep); | |
| 28 uv_prepare_start(&prep, prep_cb); | |
| 29 | |
| 30 uv_run(uv_default_loop(), UV_RUN_DEFAULT); | |
| 31 | |
| 32 return 0; | |
| 33 } |