Tor  0.4.6.0-alpha-dev
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 126 of file workqueue.c.

Field Documentation

◆ generation

unsigned generation

The current update generation of this thread

Definition at line 137 of file workqueue.c.

Referenced by worker_thread_main().

◆ in_pool

struct threadpool_t* in_pool

The pool this thread is a part of.

Definition at line 130 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 128 of file workqueue.c.

Referenced by worker_thread_main().

◆ lower_priority_chance

int32_t lower_priority_chance

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

Definition at line 139 of file workqueue.c.

◆ reply_queue

replyqueue_t* reply_queue

Reply queue to which we pass our results.

Definition at line 135 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 133 of file workqueue.c.

Referenced by worker_thread_main().


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