Caller can provide a Datahash containing configuration. More...
|
Classes | |
| class | threadpool::Pool |
| base threadpool object More... | |
Namespaces | |
| namespace | threadpool |
Functions | |
| virtual bool | threadpool::Pool::addRequest (IN thread_work_fn fn, IN void *context)=0 |
| static smart_ptr< Pool > | threadpool::Pool::create (IN const Datahash *params) |
Caller can provide a Datahash containing configuration.
This initializes a pool of worker threads.
Then the caller can add requests to the pool. The next available worker will pick up and execute the request.
NOTE: This isn't actually a thread pool yet! This library creates threads per request. But the API should be stable, and a real thread pool can be implemented underneath.
| virtual bool threadpool::Pool::addRequest | ( | IN thread_work_fn | fn, | |
| IN void * | context | |||
| ) | [pure virtual, inherited] |
Definition at line 224 of file threadpool.cpp.
1.7.1