Browse Source

Dump after ev_loop

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
42357645cb
  1. 2
      src/node.cc
  2. 4
      src/node.js
  3. 2
      src/node_io_watcher.h

2
src/node.cc

@ -1967,6 +1967,8 @@ int Start(int argc, char *argv[]) {
Tick(); Tick();
IOWatcher::Dump();
} while (need_tick_cb || ev_activecnt(EV_DEFAULT_UC) > 0); } while (need_tick_cb || ev_activecnt(EV_DEFAULT_UC) > 0);

4
src/node.js

@ -29,6 +29,10 @@ process.assert = function (x, msg) {
var writeError = process.binding('stdio').writeError; var writeError = process.binding('stdio').writeError;
// Need to force-load this binding so that we can IOWatcher::Dump in
// src/node.cc
var IOWatcher = process.binding('io_watcher');
// nextTick() // nextTick()
var nextTickQueue = []; var nextTickQueue = [];

2
src/node_io_watcher.h

@ -10,6 +10,7 @@ namespace node {
class IOWatcher : ObjectWrap { class IOWatcher : ObjectWrap {
public: public:
static void Initialize(v8::Handle<v8::Object> target); static void Initialize(v8::Handle<v8::Object> target);
static void Dump();
protected: protected:
static v8::Persistent<v8::FunctionTemplate> constructor_template; static v8::Persistent<v8::FunctionTemplate> constructor_template;
@ -35,7 +36,6 @@ class IOWatcher : ObjectWrap {
static void Callback(EV_P_ ev_io *watcher, int revents); static void Callback(EV_P_ ev_io *watcher, int revents);
static void Dump(EV_P_ ev_prepare *watcher, int revents); static void Dump(EV_P_ ev_prepare *watcher, int revents);
static void Dump();
void Start(); void Start();
void Stop(); void Stop();

Loading…
Cancel
Save