derive threadpool from cancelableobject

This commit is contained in:
itsmattkc
2020-10-30 22:48:25 +11:00
parent 26e351d363
commit 60eb71cb4c
3 changed files with 18 additions and 13 deletions
+8 -2
View File
@@ -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_;