Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Runtimes » Basic questions about the Job class
Basic questions about the Job class [message #482279] Wed, 26 August 2009 02:40 Go to next message
Eclipse UserFriend
Originally posted by: kun.wang.ymail.com

Hi,

I am new to the Eclipse Job API and have a few basic questions.

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

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? Or
will they be running in 3 threads in parallel? If the former is true, what
is the general mechanism to run different jobs in different threads
parallelly? Can you please give an example?

Thanks in advance!

Sunny
Re: Basic questions about the Job class [message #483745 is a reply to message #482279] Wed, 02 September 2009 19:28 Go to previous message
John Arthorne is currently offline John ArthorneFriend
Messages: 3
Registered: July 2009
Junior Member
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.d oc.isv/guide/runtime_jobs.htm

John
Re: Basic questions about the Job class [message #575509 is a reply to message #482279] Wed, 02 September 2009 19:28 Go to previous message
John Arthorne is currently offline John ArthorneFriend
Messages: 176
Registered: July 2009
Senior Member
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.d oc.isv/guide/runtime_jobs.htm

John
Previous Topic:Basic questions about the Job class
Next Topic:equinox experience reports
Goto Forum:
  


Current Time: Tue Mar 19 03:52:50 GMT 2024

Powered by FUDForum. Page generated in 0.01839 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top