Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Basic questions about the Job class
Basic questions about the Job class [message #482278] Wed, 26 August 2009 02:36 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 #482448 is a reply to message #482278] Wed, 26 August 2009 15:04 Go to previous messageGo to next message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
"Sunny " <kun.wang@ymail.com> wrote in message
news:6ba90449059da8e3bbc1d1bdd3a7473f$1@www.eclipse.org...
> 1. Can I think of org.eclipse.core.runtime.jobs.Job as Java Runnable?
Yes, but it is more than a runnable. Think of it as a background task.
> 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?
They will run in parallel as long as there are no scheduling rules
(Job#setRule) that prevent this.

You can find these answers and more at
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/runtime_jobs.htm
Re: Basic questions about the Job class [message #482459 is a reply to message #482448] Wed, 26 August 2009 15:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kun.wang.ymail.com

Hi,

Thanks for your answer. I am not able to open the link you gave. I found
another article:

http://www.eclipse.org/articles/Article-Concurrency/jobs-api .html

Are you referring to this one?

Sunny
Re: Basic questions about the Job class [message #482961 is a reply to message #482459] Fri, 28 August 2009 17:39 Go to previous message
Will Horn is currently offline Will HornFriend
Messages: 265
Registered: July 2009
Senior Member
That's another related article. I was pointing you to the help pages and my
link works for me. You can also get to it in the Eclipse Help directly:

Platform Plug-in Developer Guide
+ Programmer's Guide
+ Runtime overview
+ Concurrency infrastructure

-Will

"Sunny " <kun.wang@ymail.com> wrote in message
news:2bb217c5829525de4090238ec37e4103$1@www.eclipse.org...
> Hi,
>
> Thanks for your answer. I am not able to open the link you gave. I found
> another article:
>
> http://www.eclipse.org/articles/Article-Concurrency/jobs-api .html
>
> Are you referring to this one?
>
> Sunny
>
Previous Topic:Nested syntax coloring - how can it be done?
Next Topic:how to generate resource change events for non-file resources?
Goto Forum:
  


Current Time: Thu Apr 18 10:13:27 GMT 2024

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

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

Back to the top