mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Write a bunch of module documentation.
This commit adds or improves the module-level documenation for: buffers.c circuitstats.c command.c connection_edge.c control.c cpuworker.c crypto_curve25519.c crypto_curve25519.h crypto_ed25519.c crypto_format.c dircollate.c dirserv.c dns.c dns_structs.h fp_pair.c geoip.c hibernate.c keypin.c ntmain.c onion.c onion_fast.c onion_ntor.c onion_tap.c periodic.c protover.c protover.h reasons.c rephist.c replaycache.c routerlist.c routerparse.c routerset.c statefile.c status.c tor_main.c workqueue.c In particular, I've tried to explain (for each documented module) what each module does, what's in it, what the big idea is, why it belongs in Tor, and who calls it. In a few cases, I've added TODO notes about refactoring opportunities. I've also renamed an argument, and fixed a few DOCDOC comments.
This commit is contained in:
@@ -6,6 +6,20 @@
|
||||
*
|
||||
* \brief Implements worker threads, queues of work for them, and mechanisms
|
||||
* for them to send answers back to the main thread.
|
||||
*
|
||||
* The main structure here is a threadpool_t : it manages a set of worker
|
||||
* threads, a queue of pending work, and a reply queue. Every piece of work
|
||||
* is a workqueue_entry_t, containing data to process and a function to
|
||||
* process it with.
|
||||
*
|
||||
* The main thread informs the worker threads of pending work by using a
|
||||
* condition variable. The workers inform the main process of completed work
|
||||
* by using an alert_sockets_t object, as implemented in compat_threads.c.
|
||||
*
|
||||
* The main thread can also queue an "update" that will be handled by all the
|
||||
* workers. This is useful for updating state that all the workers share.
|
||||
*
|
||||
* In Tor today, there is currently only one thread pool, used in cpuworker.c.
|
||||
*/
|
||||
|
||||
#include "orconfig.h"
|
||||
|
||||
Reference in New Issue
Block a user