~neon/akonadi/master_old

Viewing all changes in revision 2648.

  • Committer: Daniel Vrátil
  • Date: 2016-04-23 21:01:54 UTC
  • Revision ID: git-v1:d1e403447476a6c25c845a5dc480b66c0adae8ab
Fix SessionThread dtor timeout when destroying default Session

The default Session does not have any owner and is managed by QThreadStorage,
so it is only destroyed when QApplication is being destroyed. Because at
this point event loop is no longer running, SessionThread::doThreadQuit()
is not invoked from SessionThread dtor and we hit the 10 seconds timeout.

This affects especially unit-test which take less than second to execute,
but then get stuck for 10 seconds in the SessionThread dtor during
clean up.

Since the new code relies on QCoreApplication::aboutToQuit() to destroy
the default Sessions while qApp is still running we had to adjust
AKONADITEST_MAIN() a little to start the QApplication event loop, because
otherwise the signal is not emitted.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: