Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

node: remove PrepareTick() and CheckTick()

Superfluous after commit 430d94e. Pointed out by Shigeki Ohtsu.
  • Loading branch information...
commit a1a9d216f752904aa017000f305a9b9a5bddf337 1 parent febffc1
Ben Noordhuis authored July 26, 2012

Showing 1 changed file with 2 additions and 22 deletions. Show diff stats Hide diff stats

  1. 24  src/node.cc
24  src/node.cc
@@ -129,8 +129,6 @@ static int max_stack_size = 0;
129 129
 // used by C++ modules as well
130 130
 bool no_deprecation = false;
131 131
 
132  
-static uv_check_t check_tick_watcher;
133  
-static uv_prepare_t prepare_tick_watcher;
134 132
 static uv_idle_t tick_spinner;
135 133
 static bool need_tick_cb;
136 134
 static Persistent<String> tick_callback_sym;
@@ -263,6 +261,7 @@ static void Spin(uv_idle_t* handle, int status) {
263 261
   Tick();
264 262
 }
265 263
 
  264
+
266 265
 static void StartTickSpinner() {
267 266
   need_tick_cb = true;
268 267
   // TODO: this tick_spinner shouldn't be necessary. An ev_prepare should be
@@ -273,23 +272,12 @@ static void StartTickSpinner() {
273 272
   uv_idle_start(&tick_spinner, Spin);
274 273
 }
275 274
 
  275
+
276 276
 static Handle<Value> NeedTickCallback(const Arguments& args) {
277 277
   StartTickSpinner();
278 278
   return Undefined();
279 279
 }
280 280
 
281  
-static void PrepareTick(uv_prepare_t* handle, int status) {
282  
-  assert(handle == &prepare_tick_watcher);
283  
-  assert(status == 0);
284  
-  Tick();
285  
-}
286  
-
287  
-
288  
-static void CheckTick(uv_check_t* handle, int status) {
289  
-  assert(handle == &check_tick_watcher);
290  
-  assert(status == 0);
291  
-  Tick();
292  
-}
293 281
 
294 282
 static inline const char *errno_string(int errorno) {
295 283
 #define ERRNO_CASE(e)  case e: return #e;
@@ -2764,14 +2752,6 @@ char** Init(int argc, char *argv[]) {
2764 2752
   RegisterSignalHandler(SIGTERM, SignalExit);
2765 2753
 #endif // __POSIX__
2766 2754
 
2767  
-  uv_prepare_init(uv_default_loop(), &prepare_tick_watcher);
2768  
-  uv_prepare_start(&prepare_tick_watcher, PrepareTick);
2769  
-  uv_unref(reinterpret_cast<uv_handle_t*>(&prepare_tick_watcher));
2770  
-
2771  
-  uv_check_init(uv_default_loop(), &check_tick_watcher);
2772  
-  uv_check_start(&check_tick_watcher, node::CheckTick);
2773  
-  uv_unref(reinterpret_cast<uv_handle_t*>(&check_tick_watcher));
2774  
-
2775 2755
   uv_idle_init(uv_default_loop(), &tick_spinner);
2776 2756
 
2777 2757
   uv_check_init(uv_default_loop(), &gc_check);

0 notes on commit a1a9d21

Please sign in to comment.
Something went wrong with that request. Please try again.