Changes: Add a queue to the engine
authorAdrien Bustany <adrien.bustany@nokia.com>
Fri, 18 Feb 2011 13:51:06 +0000 (15:51 +0200)
committerMathias Hasselmann <mathias@openismus.com>
Thu, 7 Apr 2011 22:37:40 +0000 (00:37 +0200)
commit2e07c2e1ec82125c7deaa19b4f5c7f04cf49b4a5
tree88d4dfdbdb5df1d7f36edf57ad8226af7e670328
parent5bb53ec4b70d65d57da92a5b1e58fe7620fce82a
Changes: Add a queue to the engine

RevBy: TrustMe
Details:
Queue items are subclasses of the QctTask class. The lifetime of a
QctTask is handled either by the task itself (calling deleteLater when
it's done) or by QObject parenting. The tasks does not own external
objects, that is, QctResolverTask can delete the resolver because it
created it, but QctRequestTask does not delete the request. QctTask is a
controller, not a wrapper.
QctQueue is NOT reentrant, that means if you nest calls modifying the
queue, you'll hit a deadlock. To make the queue reentrant, we'd have to
move some method calls to the mainloop, but then that fails is no global
mainloop is running, which is the case for tests for example.
src/engine/engine.cpp
src/engine/engine.h
src/engine/engine.pro
src/engine/engine_p.h
src/engine/queue.cpp [new file with mode: 0644]
src/engine/queue.h [new file with mode: 0644]
src/engine/tasks.cpp [new file with mode: 0644]
src/engine/tasks.h [new file with mode: 0644]