[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt] Re: Basic questions about the Job class

Sunny wrote:
1. Can I think of org.eclipse.core.runtime.jobs.Job as Java Runnable?

Jobs are similar to Runnable but are connected to a scheduling system that allocates them to threads automatically. In your



2. If I have:

  MyJob1 a = new MyJob1();
  MyJob2 b = new MyJob2();
  MyJob3 c = new MyJob3();
  a.schedule();
  b.schedule();
  c.schedule();

Will a, b, and c be running in the same worker thread sequentially?

They may run either sequentially or concurrently, since you haven't expressed any dependency between these three jobs. For a more detailed answer see the documentation:


http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/guide/runtime_jobs.htm

John