Skip to content

Commit 99500ed

Browse files
committed
node v0.9.4+ compatibility
1 parent 9702374 commit 99500ed

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

05_threadpool/modulename.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ Handle<Value> Async(const Arguments& args) {
5454
// Schedule our work request with libuv. Here you can specify the functions
5555
// that should be executed in the threadpool and back in the main thread
5656
// after the threadpool function completed.
57-
int status = uv_queue_work(uv_default_loop(), req, AsyncWork, AsyncAfter);
57+
int status = uv_queue_work(uv_default_loop(), req, AsyncWork,
58+
(uv_after_work_cb)AsyncAfter);
5859
assert(status == 0);
5960

6061
return Undefined();

xx_benchmark/modulename.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ Handle<Value> Fn3(const Arguments& args) {
5656
baton->request.data = baton;
5757
Local<Function> callback = Local<Function>::Cast(args[0]);
5858
baton->callback = Persistent<Function>::New(callback);
59-
uv_queue_work(uv_default_loop(), &baton->request, Fn3Work, Fn3After);
59+
uv_queue_work(uv_default_loop(), &baton->request, Fn3Work,
60+
(uv_after_work_cb)Fn3After);
6061
return Undefined();
6162
}
6263

0 commit comments

Comments
 (0)