diff --git a/test/src/uv_test/test.cpp b/test/src/uv_test/test.cpp index cda2cd1..545ff79 100644 --- a/test/src/uv_test/test.cpp +++ b/test/src/uv_test/test.cpp @@ -11,7 +11,7 @@ uv_async_t async; uv_async_t async2; -uv_async_t stopsig; +uv_async_t stopsig; uv_loop_t* loop; @@ -42,7 +42,7 @@ void async_cb2(uv_async_t* handle) void idle_cb(uv_async_t *handle) { printf("Idle callback\n"); - uv_stop(uv_default_loop()); + uv_stop(uv_default_loop()); // 一定要在回调函数内去调用,主函数内调用不生效。 } @@ -74,7 +74,6 @@ int main() }); t1.detach(); uv_run(loop, UV_RUN_DEFAULT); - uv_stop(loop); return 0; }