KIO: Mass Copy of Files from Different Sources to Different Destinations

David Faure faure at kde.org
Tue Sep 8 13:42:27 BST 2009


On Thursday 27 August 2009, Dawit A. wrote:
> On Tuesday 25 August 2009 10:10:46 Dawit A. wrote:
> > After going back and refamiliarizing myself with the scheduler code, I
> > have no objection in principle to the patch. 

And after more testing, I object to my own patch, now :-)

It can lead to deadlocks when a high-level job needs multiple subjobs;
for instance KIO::file_copy() needs a Get and a Put job, and if only one
of these gets scheduled and not the other one, it will take a "slot" in
the scheduler for an indefinite amount of time; if another file_copy does the 
same, those two jobs could just wait forever on each other.

It sounds like we need a higher-level scheduler, one that schedules the
application-level jobs, rather than the low-level simplejobs (i.e. "jobs 
assigned to a kioslave") which KIO::Scheduler knows and cares about.

This would fix the "mass copy" use case (for which I heard of other 'users'
on irc, the original poster isn't the only one with this need),
although it wouldn't fix the "FTP site with max 1 connection per IP" case
(that one is definitely in the hands of KIO::scheduler or rather a kde-global
scheduler e.g. in klauncher).

-- 
David Faure, faure at kde.org, sponsored by Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list