[tor-commits] [tor/master] Incorporate some comments based on notes from dgoulet
nickm at torproject.org
nickm at torproject.org
Wed Jan 21 19:50:31 UTC 2015
commit 051ad788e0ebcd0c99c1498e7e45faa71c4830c1
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon Dec 16 10:20:40 2013 -0500
Incorporate some comments based on notes from dgoulet
---
src/common/workqueue.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/common/workqueue.c b/src/common/workqueue.c
index f3ef678..7fa8967 100644
--- a/src/common/workqueue.c
+++ b/src/common/workqueue.c
@@ -69,9 +69,10 @@ typedef struct workerthread_s {
tor_cond_t condition;
/** Queue of pending work that we have to do. */
TOR_TAILQ_HEAD(, workqueue_entry_s) work;
- /** True iff this thread is currently in its loop. */
+ /** True iff this thread is currently in its loop. (Not currently used.) */
unsigned is_running;
- /** True iff this thread has crashed or is shut down for some reason. */
+ /** True iff this thread has crashed or is shut down for some reason. (Not
+ * currently used.) */
unsigned is_shut_down;
/** True if we're waiting for more elements to get added to the queue. */
unsigned waiting;
@@ -190,6 +191,7 @@ worker_thread_main(void *thread_)
/* TODO: support an idle-function */
/* Okay. Now, wait till somebody has work for us. */
+ /* XXXX we could just omit waiting and instead */
thread->waiting = 1;
if (tor_cond_wait(&thread->condition, &thread->lock, NULL) < 0) {
/* XXXX ERROR */
More information about the tor-commits
mailing list