[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KJob: chaining and synchronizing jobs
From:       todd rme <toddrme2178 () gmail ! com>
Date:       2011-05-03 19:15:21
Message-ID: BANLkTimmJhBpBXmM83Jy-umN91kEo3qMfg () mail ! gmail ! com
[Download RAW message or body]

On Sun, May 1, 2011 at 2:01 PM, Michael Schuerig
<michael.lists@schuerig.de> wrote:
>
> I have several KJob jobs, some of which may run in parallel, some depend
> on the results of one or more others, and all of them are fallible. The
> context is Akonadi, but I think my question is generic.
>
> I want to retrieve items from several Akonadi collections and act on
> them. By the nature of the (prefered) interface, the individual steps
> executed asynchronously as KJobs.
>
> The parts are these:
>
> I launch several retrieval jobs and want to know when all of them have
> finished. If one of them fails, all others are killed and failure is
> signaled.
>
> As far as I can tell, there's no pre-build way to group jobs in such a
> way as to be notified when all of them have finished. Therefore,
> apparently I need to do the synchronization myself, possibly by
> connecting to each jobs result signal and keeping track of how many are
> still active.
>
> For chaining jobs, I need to glue them together so that the result of
> one is passed as an argument to the next. Of course, if an error occurs,
> the chain ought to be broken.
>
> For all this I can write very specific code -- and do it again the next
> time I want to do something similar. I'd rather not do that. Instead,
> I'd like to connect independent pieces that are ignorant of each other.
>
>
> It's time for some code. I've given up on the synchronizing and just
> tried some painfully non-generic chaining.
>
>  https://github.com/mschuerig/akonadiexport
>
> I don't like that code at all, but I'm lacking a good idea how to
> improve it.
>
>
> Michael

This issue looks like it is related, at least superficially, to this
GSOC project:

http://socghop.appspot.com/gsoc/project/google/gsoc2011/munk/13001

-Todd
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic