KDE/kdevelop/lib/plugins/vcs/subversion

dukju ahn dukjuahn at gmail.com
Mon Apr 9 12:16:12 UTC 2007


> > I reviewed KJob's source code. KJOb is just an interfaces.
> >
> > The KJob::start() is pure virtual and it is
> > excuted by the main thread. Its role is to asynchronously start new job
> > in a main thread loop, or in a new thread, or in a new process.
>
> That's not correct. KIO is not thread safe, it can only be used in the main
> thread, i.e., in the GUI thread.

Thank you for pointing out that. But
We are not talking about KIO::Job. I am talking about KJob
KJob is the base class of all KIO::Job. KIO::Job (re)implements
KJob.
KDevelop will not use KIO::Job. Rather we will use KJob directly.

> > So, the important thing is that we anyway need QThread if the lengthy
> > jobs could be done asynchronously. (i.e. Inside KJob::start(), the
> > QThread::run() should be invoked.)
>
> If you use KIO in asynch mode it will not block, so you don't need threads for anything.

Yes, that was the method used in KDev3.4




More information about the KDevelop-devel mailing list