Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IProgressService vs Jobs API
IProgressService vs Jobs API [message #890002] Wed, 20 June 2012 14:24 Go to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

could someone explain me what is the best way to run long running tasks?

There are few options:

  1. the IProgressService with its:

    • busyCursorWhile(IRunnableWithProgress runnable)
    • run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
    • showInDialog(Shell shell, Job job)

  2. the IWorkbenchWindow.run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
  3. the Jobs API with its own progress UI

I'm little confused what to select.
Re: IProgressService vs Jobs API [message #890202 is a reply to message #890002] Thu, 21 June 2012 12:41 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I'd use the Job API for any long running operations, unless you have a reason not to. See http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html

The IProgressService is used as the progress provider for the Jobs framework, so Job progress is managed the same way as using progress for org.eclipse.ui.progress.IProgressService.run(boolean, boolean, IRunnableWithProgress).

PW


Re: IProgressService vs Jobs API [message #890258 is a reply to message #890202] Thu, 21 June 2012 16:00 Go to previous message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Got it, thanks Paul.
Previous Topic:How to create workspace with project automaticly
Next Topic:Show "Colors & Fonts" in my preferences
Goto Forum:
  


Current Time: Fri Apr 26 23:04:01 GMT 2024

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

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

Back to the top