--nextPart10304485.7RsoiKpaby Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Monday 29 June 2009 22:15:03 Ramon Zarazua wrote: > Well here is the experience I had: What I gathered from the documentation > is that start should call another worker method through the event loop. Almost correct. The start() method triggers the start (sic!) of the job, be= it=20 through event loop, thread, external process. KJob actually enforce nothing regarding the implementation. It's more or le= ss=20 an interface to plug the jobs in our infrastructures to track their=20 progresses, etc. I adds to that a couple of conveniences to actually implem= ent=20 the jobs. > I > tried calling it with QTimer::singleShot, however I could not get it to > work. Well, what would be interesting is the why it didn't work out. > For testing purposes I decided to call the worker method inside of > start(). And that's wrong. Actually that's the only opportunity of docu clarificatio= n I=20 see: put a big fat warning stating that the start() method is not the worke= r=20 method and should be kept async (even if it was already written in the meth= od=20 apidox but less proeminently). > Afterwards I realized that emitResult() was not instantly suiciding the j= ob > as I was led to believe. Indeed, as the name implies it emits the result, and as the docu says it ca= lls=20 deleteLater(). No more and no less. > I asked around a bit on kde-devel(mentioning that > I could not get it to be called through the event loop), and I was told > that it doesn't matter, and that return should be called. Well yes, for a singleShot() based async worker method you've to return for= it=20 to give back control (see my remark on emitResult() above). > If I was > misinformed I apologize in advance, however that means that documentation > is still not completely clear. OK, so reverting your commit now, and providing the warning I mentionned ab= ove=20 instead. Regards. =2D-=20 K=E9vin 'ervin' Ottens, http://ervin.ipsquad.net "Ni le ma=EEtre sans disciple, Ni le disciple sans ma=EEtre, Ne font reculer l'ignorance." --nextPart10304485.7RsoiKpaby Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkpJsJgACgkQB0u7y43syeITBgCePZc/mbXxtiJhn0rZC5sxgORs nbwAoI/EeMVwE4DTJfD5st8nnzcNKaIL =6rLh -----END PGP SIGNATURE----- --nextPart10304485.7RsoiKpaby--