1 #ifndef VFS_THREADPOOL_H
2 #define VFS_THREADPOOL_H
4 #include <QDomDocument>
VFS_node is the base class from which all other VFS_node classes derive.
The base class for all requests between nodes.
A wrapper for replicating nodes in different threads to produce more responsive workers in multithrea...
virtual void subtreeRequest(VFS_request *t) override
A dummy entry to override VFS_node::subtreeRequest()
Q_INVOKABLE VFS_threadpool(uint count, VFS_threadpool::mode mode, QDomElement nodeConfig, QVariantMap env, bool printConfig=false)
VFS_threadpool constructor.
VFS_threadpool::mode _mode
The distribution mode.
static const QStringList modeStrings
string names of each mode for the config file
mode
A pool will distribute requests based on a mode.
@ available
available mode will use the child with the fewest outstanding requests
@ roundrobin
roundrobin mode will cycle through children
uint _index
The current index for roundrobin requests.
virtual VFS_node * find(VFS_request *r) override
Distribute requests to children based on _mode.
virtual void executeRequest(VFS_request *t) override
A dummy entry to override VFS_node::executeRequest()
virtual bool isContainer() override
A threadpool is always a container.
virtual ~VFS_threadpool() override
VFS_threadpool destructor.
uint _count
The replication count.