Nodejs Addons uv_queue_work segmentation fault
问题 I'm trying to create a very little nodejs addons example. My c++ code is this: void __sleep(uv_work_t* req) { usleep(1000 * 1000 * 5); // = 5seconds } void after(uv_work_t *handle, int status) { printf("After\n"); } Handle<Value> foo(const Arguments& args) { HandleScope scope; uv_loop_t *loop = uv_default_loop(); uv_work_t req; uv_queue_work(loop, &req, __sleep, after); return scope.Close(Undefined()); } void InitAll(Handle<Object> exports, Handle<Object> module) { NODE_SET_METHOD(exports,