libuv 1.44.2
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3934 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
5
deps/libuv/docs/code/thread-create/main.c
vendored
5
deps/libuv/docs/code/thread-create/main.c
vendored
@ -1,5 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
@ -7,7 +6,7 @@ void hare(void *arg) {
|
||||
int tracklen = *((int *) arg);
|
||||
while (tracklen) {
|
||||
tracklen--;
|
||||
sleep(1);
|
||||
uv_sleep(1000);
|
||||
fprintf(stderr, "Hare ran another step\n");
|
||||
}
|
||||
fprintf(stderr, "Hare done running!\n");
|
||||
@ -18,7 +17,7 @@ void tortoise(void *arg) {
|
||||
while (tracklen) {
|
||||
tracklen--;
|
||||
fprintf(stderr, "Tortoise ran another step\n");
|
||||
sleep(3);
|
||||
uv_sleep(3000);
|
||||
}
|
||||
fprintf(stderr, "Tortoise done running!\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user