Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-dev] Joining on a job belonging to the same group is not supported

Hi Mickael,

Take a look at the Javadoc for Job#join methods, they describe in detail why this is not permitted. Essentially it is a high deadlock risk when combined with job pool throttling. I guess if there is only one parent it doesn't need to be in the job group, so it could be excluded from the pool from a job throttling perspective. Even better would be avoiding join altogether, and go with a fully asynchronous trigger. For example the body of JobGroup#computeGroupResult can be used to trigger any post-processing you want to do after all jobs finish, rather than tying up a thread waiting for the children to complete.

John




From:        Mickael Istria <mistria@xxxxxxxxxx>
To:        platform-dev@xxxxxxxxxxx
Date:        06/18/2015 05:45 AM
Subject:        Re: [platform-dev] Joining on a job belonging to the same group is not supported
Sent by:        platform-dev-bounces@xxxxxxxxxxx




Hi,

Is this a totally silly idea or should I open an enhancement request ?

On 06/16/2015 12:30 PM, Mickael Istria wrote:

Hi again,

While I'm getting in more details with the JobGroup API, the following error occured to me "Joining on a job belonging to the same group is not supported". Although it's pretty explicit and leaves no doubt about what is forbidden, I fail to understand why this is forbidden. In my use-case of a deep navigation in a resource tree, I'd like to create 1 job for each child and to have the parent job joining on the completion of children's job. All those jobs would share the same thread pool, throttling using JobGroup.

Why isn't it allowed for a job to join on other jobs of the JobGroup?
What would be an alternative for my use-case?

Cheers,


--
Mickael Istria
Eclipse developer at
JBoss, by Red Hat
My blog - My Tweets_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-dev

Back to the top