Asterisk - The Open Source Telephony Project GIT-master-77d630f
Data Fields
ast_taskpool_options Struct Reference

#include <taskpool.h>

Data Fields

int auto_increment
 Number of taskprocessors to increment the pool by. More...
 
int growth_threshold
 The threshold for when to grow the pool. More...
 
int idle_timeout
 Time limit in seconds for idle dynamic taskprocessors. More...
 
int initial_size
 Number of taskprocessors the pool will start with. More...
 
int max_size
 Maximum number of taskprocessors a pool may have. More...
 
int minimum_size
 Number of taskprocessors that will always exist. More...
 
enum ast_taskpool_selector selector
 The selector to use for choosing a taskprocessor. More...
 
void(* thread_end )(void)
 Function to call when a taskprocessor ends. More...
 
void(* thread_start )(void)
 Function to call when a taskprocessor starts. More...
 
int version
 

Detailed Description

Definition at line 68 of file taskpool.h.

Field Documentation

◆ auto_increment

int auto_increment

Number of taskprocessors to increment the pool by.

Definition at line 85 of file taskpool.h.

Referenced by ast_taskpool_push(), stasis_init(), and taskpool_dynamic_pool_grow().

◆ growth_threshold

int growth_threshold

The threshold for when to grow the pool.

This is the number of tasks that must be in queue before the pool will grow.

Note
If not specified a default of the 50% of the high water threshold defined in taskprocessor.h will be used.

Definition at line 124 of file taskpool.h.

Referenced by ast_taskpool_create(), taskpool_least_full_selector(), and taskpool_sequential_selector().

◆ idle_timeout

int idle_timeout

Time limit in seconds for idle dynamic taskprocessors.

A time of 0 or less will mean no timeout.

Definition at line 81 of file taskpool.h.

Referenced by stasis_init(), and taskpool_dynamic_pool_shrink().

◆ initial_size

int initial_size

Number of taskprocessors the pool will start with.

Zero is a valid value if the taskpool should start without any taskprocessors allocated.

Note
This must be equal to or greater than the minimum_size, otherwise the taskpool will adjust this to the minimum_size.

Definition at line 102 of file taskpool.h.

Referenced by ast_taskpool_create(), and stasis_init().

◆ max_size

int max_size

Maximum number of taskprocessors a pool may have.

When the taskpool's size increases, it can never increase beyond this number of taskprocessors.

Zero is a valid value if the taskpool does not have a maximum size for taskprocessors.

Note
This must be equal to or greater than the initial_size, otherwise the taskpool will adjust this to the initial_size.

Definition at line 115 of file taskpool.h.

Referenced by ast_taskpool_create(), stasis_init(), and taskpool_dynamic_pool_grow().

◆ minimum_size

int minimum_size

Number of taskprocessors that will always exist.

Zero is a valid value if the taskpool will never have taskprocessors that always exist, allowing the pool to drop to zero if not used.

Definition at line 92 of file taskpool.h.

Referenced by ast_taskpool_create(), and stasis_init().

◆ selector

enum ast_taskpool_selector selector

The selector to use for choosing a taskprocessor.

Definition at line 75 of file taskpool.h.

◆ thread_end

void(* thread_end) (void)

Function to call when a taskprocessor ends.

This is useful if there is common cleanup to execute when a taskprocessor completes

Definition at line 138 of file taskpool.h.

Referenced by taskpool_taskprocessor_stop().

◆ thread_start

void(* thread_start) (void)

Function to call when a taskprocessor starts.

This is useful if there is something common that all taskprocessors in a taskpool need to do when they start.

Definition at line 131 of file taskpool.h.

Referenced by taskpool_taskprocessor_start().

◆ version

int version

Version of taskpool options in use

Definition at line 71 of file taskpool.h.

Referenced by ParsingContext::next(), and stasis_init().


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