Fixes: make sure all tasks are deleted inside the background thread before ending it
authorFriedrich W. H. Kossebau <friedrich@openismus.com>
Wed, 18 May 2011 13:40:40 +0000 (15:40 +0200)
committerMathias Hasselmann <mathias@openismus.com>
Tue, 24 May 2011 13:47:14 +0000 (16:47 +0300)
commit2ce832455b7989600de5f0a46d76bc5b9dcac9c3
treee0ec16dbafee1da87509c16e2d5319e50ade664d
parent5a811099c9474574cc7c390fafac6c5c80d864d9
Fixes: make sure all tasks are deleted inside the background thread before ending it

RevBy: coco-heads (MR#210)

Details:
All tasks' life-time management is controlled by QctQueue (by connecting
finished() signal to deleteLater() slot of task)
All tasks also only should live in the background thread, and thus need to
be deleted before that thread is ended. So cancel needs to be called on them
while the thread exists. And the number of undestroyed tasks needs to be
tracked for that.
src/engine/queue.cpp