Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis bnoordhuis/patsje.patch Secret
Created Jun 18, 2012

Embed
What would you like to do?
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
You can’t perform that action at this time.