Eclipse RCP: only one job starts at a time?

The workplace API in Eclipse RCP seems to work a lot different than I expected. I thought that creating and scheduling multiple Jobs would actually lead to the creation of several workflows, running jobs in parallel if there was no ISchedulingRule conflict.

I came back and read the documentation more carefully, and also found this comment in the JobManager class:

/**
 * Returns a running or blocked job whose scheduling rule conflicts with the 
 * scheduling rule of the given waiting job.  Returns null if there are no 
 * conflicting jobs.  A job can only run if there are no running jobs and no blocked
 * jobs whose scheduling rule conflicts with its rule.
 */

Now it seems to me that the task manager will try to use only one workflow. Am I completely wrong? If i'm right

  • What is the point of planning rules and locks? If there is only one workflow, Jobs will never be able to get around each other. Won't they be used only when calling the Job sleep () method (for example, sleeping while holding a lock)?
  • Does any part of the platform allow two Workflows to be simultaneously performed on multiple workflows, thereby making these functions useful?

What am I missing here?

+3
source share
4 answers

Take a look at the startup method in the documentation , in particular this part:

( ), ASYNC_FINISH. , , setThread, , , .

ASYNC_FINISH interresting.

+2

AFAIK, , . , ( setRule()), , .

+1

Eclipse Corner , Eclipse Job API. IJobManager API , . , , ..

0

. Eclipse 4.5M4 (Q4 2014)

432049:

Eclipse API- . Eclipse Jobs , , .
, . - , , .

Eclipse Job Families, , , .

, Eclipse, .
API , , , , .

this commit 26471fa

0

Source: https://habr.com/ru/post/1725114/


All Articles