How to obtain a progress monitor w/o a Job? [message #782079] |
Mon, 23 January 2012 05:18 |
|
Hi,
I've a plug-in that extensively makes use of thread pools to execute operations. The thread pool is used to ensure a few things:
1. Threads should run on a minimal priority and should not disturb the IDE experience. Best, they compute things only if a CPU is idle.
2. At most, a MAX number of operations should be executed at the same time.
3. Some operations should report back to the Eclipse progress bars and views.
Obviously, the Jobs API seems to be a good fit for 3. But how can I ensure 1 and 2?
Is job.setPriority(DECORATE) similar to Thread.MIN_PRIORITY?
Can/should ISchedulingRules be used to limit the number of active jobs of the same kind?
There are potentially hundreds of Jobs that would get scheduled at the same time. If the Jobs API is not the right solution to this, is there a (standard) way to obtain a IProgressMonitor to use in your own threads (outside the Jobs framework)?
Thanks for advice.
|
|
|
Powered by
FUDForum. Page generated in 0.03895 seconds