|
libircbot
library providing a framework for implementing an IRC bot
|
A configuration object for the integrated thread pool. More...
#include <ircbot/ircbot.h>
Public Member Functions | |
| void | IBThreadOpts_setNThreads (IBThreadOpts *self, int num) |
| Set fixed number of threads. More... | |
| void | IBThreadOpts_setMaxThreads (IBThreadOpts *self, int num) |
| Set maximum number of threads. More... | |
| void | IBThreadOpts_setNPerCpu (IBThreadOpts *self, int num) |
| Set number of threads per CPU. More... | |
| void | IBThreadOpts_setDefNThreads (IBThreadOpts *self, int num) |
| Set default number of threads. More... | |
| void | IBThreadOpts_setQueueLen (IBThreadOpts *self, int num) |
| Set a fixed size for the queue of waiting thread jobs. More... | |
| void | IBThreadOpts_setMaxQueueLen (IBThreadOpts *self, int num) |
| Set the maximum size for the queue of waiting thread jobs. More... | |
| void | IBThreadOpts_setMinQueueLen (IBThreadOpts *self, int num) |
| Set the minimum size for the queue of waiting thread jobs. More... | |
| void | IBThreadOpts_setQLenPerThread (IBThreadOpts *self, int num) |
| Set the number of queue entries per thread. More... | |
A configuration object for the integrated thread pool.
| void IBThreadOpts_setDefNThreads | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set default number of threads.
This is used if no fixed number is given and the number of CPUs can't be determined. Default: 8.
| self | the IBThreadOpts |
| num | the default number of threads |
| void IBThreadOpts_setMaxQueueLen | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set the maximum size for the queue of waiting thread jobs.
Default: 1024
| self | the IBThreadOpts |
| num | the maximum queue size |
| void IBThreadOpts_setMaxThreads | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set maximum number of threads.
If number of threads are derived from the number of CPU, this will be the upper limit to use. Default: 128.
| self | the IBThreadOpts |
| num | the maximum number of threads |
| void IBThreadOpts_setMinQueueLen | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set the minimum size for the queue of waiting thread jobs.
Default: 64
| self | the IBThreadOpts |
| num | the minimum queue size |
| void IBThreadOpts_setNPerCpu | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set number of threads per CPU.
Defaults to 2 threads per CPU.
| self | the IBThreadOpts |
| num | the number of threads per CPU |
| void IBThreadOpts_setNThreads | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set fixed number of threads.
If this is given, the thread pool always uses this number of threads. Default: 0 (unset).
| self | the IBThreadOpts |
| num | the numer of threads |
| void IBThreadOpts_setQLenPerThread | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set the number of queue entries per thread.
Default: 2
| self | the IBThreadOpts |
| num | the queue entries per thread |
| void IBThreadOpts_setQueueLen | ( | IBThreadOpts * | self, |
| int | num | ||
| ) |
Set a fixed size for the queue of waiting thread jobs.
Default: 0 (unset).
| self | the IBThreadOpts |
| num | the queue size |