public
Created

Async Call

  • Download Gist
gistfile1.cpp
C++
1 2 3 4 5 6 7 8
#define ASYNC_CALL(func, callback, ...) \
FSReqWrap* req_wrap = new FSReqWrap(); \
int r = uv_fs_##func(uv_default_loop(), &req_wrap->req_, \
__VA_ARGS__, After); \
assert(r == 0); \
req_wrap->object_->Set(oncomplete_sym, callback); \
req_wrap->Dispatched(); \
return scope.Close(req_wrap->object_);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.