On Donnerstag, 8. August 2013 15:52:56 CEST, Pali Rohár wrote:
For emails with lot of recipients this could lead to application
crash... For each email address trojita is starting job.
You mean for OOM due to job overhead?
You could still keep up to 32 jobs in parallel or so.
(Everytime one returns and the counter moves < 32, start the next one out of
the queue)
+ QTimer::singleShot(0, this, SLOT(checkAddressesWork()));
*cough*
What to use?
QMetaObject::invokeMethod(this, "checkAddressesKnown", Qt::QueuedConnection);
If you want to "skip the event loop" you should ask to "skip the event loop" and not hope
"QTimer will skip the event loop"
Notice that aside the pointless QTimer dependency, the default timer in Qt5
will be the coarse one, ie. if Qt keeps that client code fix up,
QTimer::singleShot(0,.) does actually not do what it suggests.
Cheers,
Thomas