marble
#include <AbstractWorkerThread.h>

Public Member Functions | |
AbstractWorkerThread (QObject *parent=0) | |
virtual | ~AbstractWorkerThread () |
void | ensureRunning () |
Protected Member Functions | |
void | run () |
virtual void | work ()=0 |
virtual bool | workAvailable ()=0 |
Detailed Description
The AbstractWorkerThread is a class written for small tasks that have to run multiple times on different data asynchronously.
You should be able to use this class for many different tasks, but you'll have to think about Multi-Threading additionally. The AbstractWorkerThread runs the function work() as long as workAvailable() returns true. If there is no work available for a longer time, the thread will switch itself off. As a result you have to call ensureRunning() every time you want something to be worked on. You'll probably want to call this in your addSchedule() function.
Definition at line 36 of file AbstractWorkerThread.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 48 of file AbstractWorkerThread.cpp.
|
virtual |
Definition at line 54 of file AbstractWorkerThread.cpp.
Member Function Documentation
void Marble::AbstractWorkerThread::ensureRunning | ( | ) |
Definition at line 59 of file AbstractWorkerThread.cpp.
|
protected |
Definition at line 70 of file AbstractWorkerThread.cpp.
|
protectedpure virtual |
Implemented in Marble::BBCParser, and Marble::BBCItemGetter.
|
protectedpure virtual |
Implemented in Marble::BBCParser, and Marble::BBCItemGetter.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.