Array group of threads. More...
#include <thread.h>

Public Member Functions | |
| void | add (class groupthread *t) |
| void | remove (class groupthread *t) |
| groupthread & | operator[] (int idx) |
| void | broadcastevent (const value &ev) |
| void | broadcastevent (const string &tp) |
| void | broadcastevent (const statstring &tp) |
| void | broadcastevent (const char *tp) |
| void | broadcastevent (const statstring &t, const value &ev) |
| int | count (void) |
| void | gc (void) |
Public Attributes | |
| lock< int > | lck |
Protected Attributes | |
| class groupthread ** | array |
| int | cnt |
| int | arraysz |
Array group of threads.
Storage for situations where you have a group of worker threads that you want to keep track of. Collects thread objects that are derived from the groupthread class.
| void threadgroup::add | ( | class groupthread * | t | ) |
Add a new thread to the array.
Called from the groupthread constructor.
References arraysz, cnt, lck, lockbase::lockw(), and lockbase::unlock().
Referenced by groupthread::groupthread().

| void threadgroup::broadcastevent | ( | const value & | ev | ) |
| int threadgroup::count | ( | void | ) | [inline] |
Get a thread count.
References cnt.
Referenced by httpd::handle(), smtpd::run(), httpd::run(), and smtpd::shutdown().
| groupthread& threadgroup::operator[] | ( | int | idx | ) | [inline] |
Array access operator.
| idx | The index number. |
| threadGroupIndexException | Index was out of bounds. |
References cnt.
1.6.1