Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
node: remove PrepareTick() and CheckTick()
Browse files Browse the repository at this point in the history
Superfluous after commit 430d94e. Pointed out by Shigeki Ohtsu.
  • Loading branch information
bnoordhuis committed Jul 26, 2012
1 parent e549833 commit 59b584c
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions src/node.cc
Expand Up @@ -129,8 +129,6 @@ static int max_stack_size = 0;
// used by C++ modules as well
bool no_deprecation = false;

static uv_check_t check_tick_watcher;
static uv_prepare_t prepare_tick_watcher;
static uv_idle_t tick_spinner;
static bool need_tick_cb;
static Persistent<String> tick_callback_sym;
Expand Down Expand Up @@ -263,6 +261,7 @@ static void Spin(uv_idle_t* handle, int status) {
Tick();
}


static void StartTickSpinner() {
need_tick_cb = true;
// TODO: this tick_spinner shouldn't be necessary. An ev_prepare should be
Expand All @@ -273,23 +272,12 @@ static void StartTickSpinner() {
uv_idle_start(&tick_spinner, Spin);
}


static Handle<Value> NeedTickCallback(const Arguments& args) {
StartTickSpinner();
return Undefined();
}

static void PrepareTick(uv_prepare_t* handle, int status) {
assert(handle == &prepare_tick_watcher);
assert(status == 0);
Tick();
}


static void CheckTick(uv_check_t* handle, int status) {
assert(handle == &check_tick_watcher);
assert(status == 0);
Tick();
}

static inline const char *errno_string(int errorno) {
#define ERRNO_CASE(e) case e: return #e;
Expand Down Expand Up @@ -2764,14 +2752,6 @@ char** Init(int argc, char *argv[]) {
RegisterSignalHandler(SIGTERM, SignalExit);
#endif // __POSIX__

uv_prepare_init(uv_default_loop(), &prepare_tick_watcher);
uv_prepare_start(&prepare_tick_watcher, PrepareTick);
uv_unref(reinterpret_cast<uv_handle_t*>(&prepare_tick_watcher));

uv_check_init(uv_default_loop(), &check_tick_watcher);
uv_check_start(&check_tick_watcher, node::CheckTick);
uv_unref(reinterpret_cast<uv_handle_t*>(&check_tick_watcher));

uv_idle_init(uv_default_loop(), &tick_spinner);

uv_check_init(uv_default_loop(), &gc_check);
Expand Down

0 comments on commit 59b584c

Please sign in to comment.