On Thursday 08 August 2013 19:32:13 Thomas Lübking wrote:
> 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)
> 

Ok.

> >> +    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

Reason why I used QTimer::singleShot was that it is offent used in 
trojita code. Just run wc -l:

$ grep "QTimer::singleShot(0" -R src/ | wc -l
36
$ grep "QMetaObject::invokeMethod" -R src/ | wc -l
1

-- 
Pali Rohár
pali.ro...@gmail.com

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to