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

[tor-commits] [tor/master] Fix a pair of stale comments in workqueue.c



commit bddea78dede010cdf0115265546cdca0c47d64d0
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Jul 12 11:52:13 2017 -0400

    Fix a pair of stale comments in workqueue.c
    
    These comments said that each thread had a separate queue, but we
    haven't been using that design for some while.
---
 src/common/workqueue.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/common/workqueue.c b/src/common/workqueue.c
index a372501f1..f44f566d2 100644
--- a/src/common/workqueue.c
+++ b/src/common/workqueue.c
@@ -113,9 +113,7 @@ struct replyqueue_s {
   alert_sockets_t alert;
 };
 
-/** A worker thread represents a single thread in a thread pool.  To avoid
- * contention, each gets its own queue. This breaks the guarantee that that
- * queued work will get executed strictly in order. */
+/** A worker thread represents a single thread in a thread pool. */
 typedef struct workerthread_s {
   /** Which thread it this?  In range 0..in_pool->n_threads-1 */
   int index;
@@ -368,7 +366,7 @@ workerthread_new(int32_t lower_priority_chance,
  * take from the queued work with the highest prioirity, but will occasionally
  * visit lower-priority queues to keep them from starving completely.
  *
- * Note that because each thread has its own work queue, work items may not
+ * Note that because of priorities and thread behavior, work items may not
  * be executed strictly in order.
  */
 workqueue_entry_t *



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