Skip to content

Instantly share code, notes, and snippets.

From 8a27de2989bf55d6cf19c108fbf308376aa7e4e3 Mon Sep 17 00:00:00 2001
From: Ryan Dahl <[email protected]>
Date: Wed, 9 Nov 2011 17:31:53 -0800
Subject: [PATCH] Alternative ERRNO strategy
---
include/uv.h | 106 +++++++++++++++++++++++++++++--------------------------
src/uv-common.c | 53 ++--------------------------
2 files changed, 59 insertions(+), 100 deletions(-)
var cluster = require('cluster');
var http = require('http');
if (cluster.isMaster) {
// Fork workers.
var ncpus = require('os').cpus().length;
for (var i = 0; i < ncpus; i++) {
cluster.fork();
}
From a936768890db2e4b14f8994a84edb7121e6c82d0 Mon Sep 17 00:00:00 2001
From: Ryan Dahl <[email protected]>
Date: Thu, 3 Nov 2011 13:27:26 -0700
Subject: [PATCH] stdout and stderr are blocking when referring to regular files
Fixes message tests.
---
doc/api/process.markdown | 12 ++++++++-
lib/fs.js | 61 ++++++++++++++++++++++++++++++++++++++++++++++
src/node.js | 2 +-
python tools/test.py --mode=release simple message
=== release test-debugger-repl ===
Path: simple/test-debugger-repl
Command: out/Release/node /Users/ryan/projects/node/test/simple/test-debugger-repl.js
=== release test-setproctitle ===
Path: simple/test-setproctitle
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
AssertionError: "out/Release/node /Users/ryan/projects/node/test/simple/test-setproctitle.js" == "testTestTESTtest123123123123123123HiHaiJo"
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index 6c36c78..409430e 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -627,31 +627,52 @@ void AfterGetAddrInfo(uv_getaddrinfo_t* req, int status, struct addrinfo* res) {
n = 0;
- // Iterate over the responses again this time creating javascript
+ // Iterate over the IPv4 responses again this time creating javascript
From 813ef44acd83b35580c1a14214c712ab7a56ef35 Mon Sep 17 00:00:00 2001
From: Ryan Dahl <[email protected]>
Date: Mon, 24 Oct 2011 11:55:02 -0700
Subject: [PATCH] Remove resume and pause events
---
doc/api/streams.markdown | 3 ---
lib/stream.js | 37 ++++++-------------------------------
lib/util.js | 16 ----------------
3 files changed, 6 insertions(+), 50 deletions(-)
[00:00|% 0|+ 0|- 0]: release test-assert
[00:00|% 0|+ 1|- 0]: release test-buffer
[00:00|% 0|+ 2|- 0]: release test-c-ares
=== release test-c-ares ===
Path: simple/test-c-ares
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\ryan>cd ndoe
The system cannot find the path specified.
C:\Users\ryan>cd node
C:\Users\ryan\node>Debug\node.exe debug lib\fs.js
debug> repl.context is deprecated.
diff --git a/lib/net.js b/lib/net.js
index 561ebae..d9e2c10 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -67,6 +67,9 @@ function initSocketHandle(self) {
self.bytesRead = 0;
self.bytesWritten = 0;
+ self.writeData = '';
+ self.writeCallbacks = [];
node benchmark/http_simple.js
ab -t 10 -c 100 http://127.0.0.1:8000/bytes/1232 | grep Req
== master 25ff181
5748.81
5692.50
5714.63
== v0.4.12
5676.00