Bug 227025 - [jobs] need notification of Job beginRule/endRule, multithreaded builds
Summary: [jobs] need notification of Job beginRule/endRule, multithreaded builds
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-14 16:42 EDT by Randall Theobald CLA
Modified: 2019-09-06 15:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randall Theobald CLA 2008-04-14 16:42:48 EDT
I am a performance analyst of an adopting product. Part of our next stage of performance improvements involves some multi-threading. During my prototyping I have run into a limitation in the Jobs API.

I want to be able to break a Job up into multiple child Jobs and allow them to execute concurrently. However, each child Job will need access to an unknown set of resources in the workspace to do its work. All the resources are contained by the rule held by the parent Job, however, I need to implement my own rule contention among the child Jobs. While I can use the ISchedulingRule.contains(..) method in a custom rule on my child Jobs to listen for when a Job needs a rule, there is no way to know that the Job is done with a rule (until it is completely finished).

I propose that some additions be made to the Jobs API to allow registration of something like an 'IJobRuleChangeListener' that has two methods: 

   beginningRule(ISchedulingRule rule);
   endingRule(ISchedulingRule rule);

This would allow custom rule contention.

As a side note, this is necessary since the Jobs API doesn't already include the concept of parent and child jobs, in terms of scheduling rules. I understand this as it would probably just add typically unused complexity. However, this all comes about because we have particularly heavy builders and we need to implement some parallel processing during the build cycle. Unfortunately, an Eclipse build is painfully single-threaded... There may be more demand for this sort of thing as the number of CPUs/cores increases in a typical desktop.
Comment 1 Randall Theobald CLA 2008-04-17 13:04:39 EDT
We realized that using this in the build still won't work because of the current behavior of the AutoBuildJob getting interrupted if a workspace modification is needed in a thread other than the AutoBuildJob.

It looks like significant changes would be required to support multi-threading a build job, which I think will need to happen in the near future.
Comment 2 Eclipse Webmaster CLA 2019-09-06 15:30:56 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.