Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340819 - The Jobs API should support a CommonJob
Summary: The Jobs API should support a CommonJob
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-23 18:19 EDT by Serge Beauchamp CLA
Modified: 2019-11-14 02:18 EST (History)
3 users (show)

See Also:


Attachments
First Draft Implementation (20.75 KB, patch)
2011-03-23 18:22 EDT, Serge Beauchamp CLA
no flags Details | Diff
New implementation (27.26 KB, patch)
2011-04-01 06:34 EDT, Serge Beauchamp CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Beauchamp CLA 2011-03-23 18:19:51 EDT
The Jobs API should support a CommonJob to share a common background thread so runnables that should not block the main thread, but are API rich, short lived, and make the Eclipse threading model unnecessarily complex can use.
Comment 1 Serge Beauchamp CLA 2011-03-23 18:22:13 EDT
Created attachment 191800 [details]
First Draft Implementation

First Draft Implementation.

JUnit Test Code Coverage:

CommonJob.java:                  79.7%
CommonJobManager.java:  85.2%
Comment 2 Serge Beauchamp CLA 2011-03-31 08:34:17 EDT
Please refer to the following 15 min presentation to give a perspective on the requirement for this feature:

http://www.youtube.com/watch?v=tCeUO-kovFE
Comment 3 Serge Beauchamp CLA 2011-04-01 06:34:02 EDT
Created attachment 192345 [details]
New implementation

Thanks James for your suggestions.

The new implementation:

  - supports CommonJob.asyncExec()
  - supports CommonJob.getThread(), which returns the common thread used for all CommonJobs.
  - The CommonJobManager now uses a real thread, instead of a Job, so that CommonJobs can rely on a single, identical thread being consistently used for executing code.
  - Comprehensive java docs 


JUnit Test Code Coverage:

CommonJob.java: 100%
CommonJobManager.java:  87.9%
Comment 4 Lars Vogel CLA 2019-11-14 02:18:07 EST
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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.