[ThreadWeaver] Several Weaver instances

Paulo Moura Guedes moura at kdewebdev.org
Wed Apr 18 14:57:56 BST 2007


On Wednesday 18 April 2007 14:29, you wrote:
> Hi Paulo,
>
> that is not difficult at all. In fact, it is anticipated.
>
> Just create a ThreadWeaver::Weaver object. It will behave just like the
> singleton. One of the examples does it that way.

Great, I already took a look at the SMIV model and noticed the 
ThreadWeaver::Weaver have a public constructor.
I already have the code working :)

> Dependencies of jobs do function across Weaver objects.

If the same priority is used for the jobs, is it garanteed the the jobs will 
be executed by their queue order?
Anyway I got this job that should only be started when all jobs of a certain 
kind are finished. I couldn't find a way to do this, as addDependency() works 
with instances of jobs, not job types.

> Be aware that destructing the object can only be done if really all jobs
> are out of the queue, otherwise your program will get mad at you.

OK, thanks.

Paulo

> On Wednesday 18 April 2007 12:50, you wrote:
> > Hi Mirko,
> >
> > I need to have several weaver instances, instead of the general
> > singleton. How difficult would that be?
> >
> > Paulo




More information about the kde-core-devel mailing list