diff --git a/05_threadpool/modulename.cpp b/05_threadpool/modulename.cpp index c76761f..cf49c1f 100644 --- a/05_threadpool/modulename.cpp +++ b/05_threadpool/modulename.cpp @@ -54,7 +54,8 @@ Handle Async(const Arguments& args) { // Schedule our work request with libuv. Here you can specify the functions // that should be executed in the threadpool and back in the main thread // after the threadpool function completed. - int status = uv_queue_work(uv_default_loop(), req, AsyncWork, AsyncAfter); + int status = uv_queue_work(uv_default_loop(), req, AsyncWork, + (uv_after_work_cb)AsyncAfter); assert(status == 0); return Undefined(); diff --git a/xx_benchmark/modulename.cpp b/xx_benchmark/modulename.cpp index 7b2bb95..253344c 100644 --- a/xx_benchmark/modulename.cpp +++ b/xx_benchmark/modulename.cpp @@ -56,7 +56,8 @@ Handle Fn3(const Arguments& args) { baton->request.data = baton; Local callback = Local::Cast(args[0]); baton->callback = Persistent::New(callback); - uv_queue_work(uv_default_loop(), &baton->request, Fn3Work, Fn3After); + uv_queue_work(uv_default_loop(), &baton->request, Fn3Work, + (uv_after_work_cb)Fn3After); return Undefined(); }