[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Remove tell_event_loop_to_run_external_code() per review



commit 4c03af48806ac03e5754a7531ee9e915fc2f6c8c
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Apr 13 12:11:22 2018 -0400

    Remove tell_event_loop_to_run_external_code() per review
    
    (This function is no longer used.)
---
 src/or/main.c | 14 --------------
 src/or/main.h |  1 -
 2 files changed, 15 deletions(-)

diff --git a/src/or/main.c b/src/or/main.c
index 257af8b18..074746108 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -731,20 +731,6 @@ connection_should_read_from_linked_conn(connection_t *conn)
   return 0;
 }
 
-/** If we called event_base_loop() and told it to never stop until it
- * runs out of events, now we've changed our mind: tell it we want it to
- * exit once the current round of callbacks is done, so that we can
- * run external code, and then return to the main loop. */
-void
-tell_event_loop_to_run_external_code(void)
-{
-  if (!called_loop_once) {
-    struct timeval tv = { 0, 0 };
-    tor_libevent_exit_loop_after_delay(tor_libevent_get_base(), &tv);
-    called_loop_once = 1; /* hack to avoid adding more exit events */
-  }
-}
-
 /** Event to run 'shutdown did not work callback'. */
 static struct event *shutdown_did_not_work_event = NULL;
 
diff --git a/src/or/main.h b/src/or/main.h
index f01506fce..5ca435064 100644
--- a/src/or/main.h
+++ b/src/or/main.h
@@ -45,7 +45,6 @@ int connection_is_writing(connection_t *conn);
 MOCK_DECL(void,connection_stop_writing,(connection_t *conn));
 MOCK_DECL(void,connection_start_writing,(connection_t *conn));
 
-void tell_event_loop_to_run_external_code(void);
 void tor_shutdown_event_loop_and_exit(int exitcode);
 int tor_event_loop_shutdown_is_pending(void);
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits