diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-07-12 12:17:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-27 16:28:59 -0400 |
commit | 0ae0b5aa4136fe6df7863c8a5b7d239d519b7393 (patch) | |
tree | b6091d0a70fcc9a03f2c0ff361e7c02ba2e7f1d7 /src/or/cpuworker.c | |
parent | bddea78dede010cdf0115265546cdca0c47d64d0 (diff) | |
download | tor-0ae0b5aa4136fe6df7863c8a5b7d239d519b7393.tar.gz tor-0ae0b5aa4136fe6df7863c8a5b7d239d519b7393.zip |
Queue consensus diffs at LOW priority.
Fixes bug 22883.
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r-- | src/or/cpuworker.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 1013fa555e..ad99af64c0 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -481,16 +481,18 @@ queue_pending_tasks(void) /** DOCDOC */ MOCK_IMPL(workqueue_entry_t *, -cpuworker_queue_work,(workqueue_reply_t (*fn)(void *, void *), +cpuworker_queue_work,(workqueue_priority_t priority, + workqueue_reply_t (*fn)(void *, void *), void (*reply_fn)(void *), void *arg)) { tor_assert(threadpool); - return threadpool_queue_work(threadpool, - fn, - reply_fn, - arg); + return threadpool_queue_work_priority(threadpool, + priority, + fn, + reply_fn, + arg); } /** Try to tell a cpuworker to perform the public key operations necessary to @@ -545,7 +547,8 @@ assign_onionskin_to_cpuworker(or_circuit_t *circ, memwipe(&req, 0, sizeof(req)); ++total_pending_tasks; - queue_entry = threadpool_queue_work(threadpool, + queue_entry = threadpool_queue_work_priority(threadpool, + WQ_PRI_HIGH, cpuworker_onion_handshake_threadfn, cpuworker_onion_handshake_replyfn, job); |