Browse Source

Rename "tell_event_loop_to_finish" to "...run_external_code"

This function was never about 'finishing' the event loop, but rather
about making sure that the code outside the event loop would be run
at least once.
Nick Mathewson 6 years ago
parent
commit
78cbced45c
3 changed files with 4 additions and 4 deletions
  1. 1 1
      src/or/connection_edge.c
  2. 2 2
      src/or/main.c
  3. 1 1
      src/or/main.h

+ 1 - 1
src/or/connection_edge.c

@@ -999,7 +999,7 @@ connection_ap_mark_as_pending_circuit_(entry_connection_t *entry_conn,
    * So the fix is to tell it right now that it ought to finish its loop at
    * its next available opportunity.
    */
-  tell_event_loop_to_finish();
+  tell_event_loop_to_run_external_code();
 }
 
 /** Mark <b>entry_conn</b> as no longer waiting for a circuit. */

+ 2 - 2
src/or/main.c

@@ -639,7 +639,7 @@ connection_should_read_from_linked_conn(connection_t *conn)
  * runs out of events, now we've changed our mind: tell it we want it to
  * finish. */
 void
-tell_event_loop_to_finish(void)
+tell_event_loop_to_run_external_code(void)
 {
   if (!called_loop_once) {
     struct timeval tv = { 0, 0 };
@@ -663,7 +663,7 @@ connection_start_reading_from_linked_conn(connection_t *conn)
     /* make sure that the event_base_loop() function exits at
      * the end of its run through the current connections, so we can
      * activate read events for linked connections. */
-    tell_event_loop_to_finish();
+    tell_event_loop_to_run_external_code();
   } else {
     tor_assert(smartlist_contains(active_linked_connection_lst, conn));
   }

+ 1 - 1
src/or/main.h

@@ -45,7 +45,7 @@ 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_finish(void);
+void tell_event_loop_to_run_external_code(void);
 
 void connection_stop_reading_from_linked_conn(connection_t *conn);