From kde-core-devel Wed Aug 19 22:15:53 2009 From: "Dawit A." Date: Wed, 19 Aug 2009 22:15:53 +0000 To: kde-core-devel Subject: Re: KIO: Mass Copy of Files from Different Sources to Different Message-Id: <200908191815.53719.adawit () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125072018919397 On Wednesday 19 August 2009 11:12:12 David Faure wrote: > On Thursday 18 June 2009, Alejandro Wainzinger wrote: > > Using KIO::copy( ... ) to generate more than 150 jobs causes the KIO > > scheduler to complain: > > > > "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse > > in your app (yes, a job is a QObject)." > > > > What misuse is this, isn't the KIO::Scheduler supposed to schedule > > jobs? I notice that you can directly tell the scheduler to schedule a > > job with KIO::Scheduler::scheduleJob(...) which will queue jobs when > > no slaves are left over and possibly avoid this error, but that only > > works for SimpleJobs, and a CopyJob is not a SimpleJob. > > > > Up until now I've worked around it by manually keeping track of jobs I > > create and jobs that finish so as not to make the Scheduler angry, but > > shouldn't this be part of the Scheduler's job? > > > > I notice most applications don't run into this issue because they use > > KIO to copy a folder that could contain more than 150 files which is > > fine, or copy more than 150 files to a single destination, but in my > > case each file I copy can come from a different source and go to a > > different destination so I can not aggregate the jobs. > > This could be another reason for "all jobs should be scheduled", > as we were discussing in another thread ("Patch KIO::AccessManager"). > > I just gave it a try, as an experiment. Shows that scheduleJob has to > support being called twice for a job, but apart from that, the unittest > "jobtest" still passes, which is good enough for me :-) hmm... would this not mean that the "Direct" scheduling method that has been the default will go away completely ? In other words, there is no way to have a single job per single connection (read: ioslave) support anymore ? I am sure most application will remain unaffected, but if there are any applications out there that somehow relied on this behavior, then they will be broken, no ?