- Add `Makefile` for example codes. (cherry-pick from old uvbook repo)
- Add a new example "Default loop" to "Basics of libuv"/"Default loop"
- Document review and update: `Introduction`, `Basics of libuv`, `Filesystem`
+ Update the referenced libuv code snippet
+ Link update: http->https
**Content Updates**:
- `filesystem.rst`#L291-L297: Add note for `uv_fs_event_start`
- `filesystem.rst`#L334: Add description of the callback function parameter `status`
The following examples have been tested manually in WSL2 (Ubuntu 20.04) with libuv 1.42.0:
- helloworld
- default-loop
- idle-basic
- uvcat
- uvtee
- onchange (test on macOS)
Co-authored-by: Nikhil Marathe <nsm.nikhil@gmail.com>
13 lines
198 B
C
13 lines
198 B
C
#include <stdio.h>
|
|
#include <uv.h>
|
|
|
|
int main() {
|
|
uv_loop_t *loop = uv_default_loop();
|
|
|
|
printf("Default loop.\n");
|
|
uv_run(loop, UV_RUN_DEFAULT);
|
|
|
|
uv_loop_close(loop);
|
|
return 0;
|
|
}
|