Tor 0.4.9.2-alpha-dev
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Fields
workerthread_t Struct Reference

Data Fields

int index
 
struct threadpool_tin_pool
 
void * state
 
replyqueue_treply_queue
 
unsigned generation
 
int32_t lower_priority_chance
 

Detailed Description

A worker thread represents a single thread in a thread pool.

Definition at line 136 of file workqueue.c.

Field Documentation

◆ generation

unsigned generation

The current update generation of this thread

Definition at line 147 of file workqueue.c.

◆ in_pool

struct threadpool_t* in_pool

The pool this thread is a part of.

Definition at line 140 of file workqueue.c.

Referenced by worker_thread_extract_next_work(), and worker_thread_main().

◆ index

int index

Which thread it this? In range 0..in_pool->n_threads-1

Definition at line 138 of file workqueue.c.

◆ lower_priority_chance

int32_t lower_priority_chance

One over the probability of taking work from a lower-priority queue.

Definition at line 149 of file workqueue.c.

◆ reply_queue

replyqueue_t* reply_queue

Reply queue to which we pass our results.

Definition at line 145 of file workqueue.c.

◆ state

void* state

User-supplied state field that we pass to the worker functions of each work item.

Definition at line 143 of file workqueue.c.


The documentation for this struct was generated from the following file: