derive threadpool from cancelableobject
This commit is contained in:
@@ -34,14 +34,20 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void Cancel() {
|
||||
void Cancel()
|
||||
{
|
||||
cancelled_ = true;
|
||||
CancelEvent();
|
||||
}
|
||||
|
||||
const QAtomicInt& IsCancelled() const {
|
||||
const QAtomicInt& IsCancelled() const
|
||||
{
|
||||
return cancelled_;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void CancelEvent(){}
|
||||
|
||||
private:
|
||||
QAtomicInt cancelled_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user