-
-
Save bnoordhuis/9a86a9d77ce48f28c353 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nas.cc b/nas.cc | |
index cd68f7b..e9b1b18 100644 | |
--- a/nas.cc | |
+++ b/nas.cc | |
@@ -10,7 +10,7 @@ using namespace node; | |
using namespace v8; | |
static Handle<Value> DoSomethingAsync (const Arguments&); | |
-static int DoSomething (eio_req *); | |
+static void DoSomething (eio_req *); | |
static int DoSomething_After (eio_req *); | |
extern "C" void init (Handle<Object>); | |
@@ -48,11 +48,10 @@ static Handle<Value> DoSomethingAsync (const Arguments& args) { | |
// this function happens on the thread pool | |
// doing v8 things in here will make bad happen. | |
-static int DoSomething (eio_req *req) { | |
+static void DoSomething (eio_req *req) { | |
struct simple_request * sr = (struct simple_request *)req->data; | |
sleep(2); // just to make it less pointless to be async. | |
req->result = sr->x + sr->y; | |
- return 0; | |
} | |
static int DoSomething_After (eio_req *req) { | |
diff --git a/test.js b/test.js | |
index 0b6c10c..aa06094 100644 | |
--- a/test.js | |
+++ b/test.js | |
@@ -1,4 +1,4 @@ | |
-var nas = require("./build/default/nas") | |
+var nas = require("./build/Release/nas") | |
, start = Date.now() | |
console.log("js "+(Date.now() - start), "before hello") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment