Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » JOBs and waiting in the UI.
JOBs and waiting in the UI. [message #231206] Mon, 19 April 2004 16:12 Go to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

I have a JOB that can be run scheduled from either a UI thread or a
non-UI thread. I need to be able to join up on the job, again either on
the ui thead or the other thread, but I can't have the UI thread stop
processing the display queue.

Does the job.join() operation understand that the thread waiting is a UI
thread, and so will keep the UI thread spinning?

If it does hold up the UI thread, is there a good way of keeping the UI
thread active, but still waiting at that point and not returning until
the job is finished.

Does the IJobManager.begin(ISchedulingRule) also understand that it
could be coming in from a UI thread, and if the rule says block, it
keeps the UI thread spinning but doesn't return until the scheduling
rule is satisfied?

--
Thanks, Rich Kulp

Re: JOBs and waiting in the UI. [message #233645 is a reply to message #231206] Fri, 23 April 2004 20:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

You should not rely on either of those things happening. If you want
the UI to wait for some indefinite period of time, use a modal progress
mechanism such as the progress service. You need something like this:

PlatformUI.getWorkbench().getProgressService().run(runnable, true, true);

Where "runnable" is an implementation of IRunnableWithProgress that does
the join, lock.acquire(), or other such blocking call.
--

Rich Kulp wrote:
> I have a JOB that can be run scheduled from either a UI thread or a
> non-UI thread. I need to be able to join up on the job, again either on
> the ui thead or the other thread, but I can't have the UI thread stop
> processing the display queue.
>
> Does the job.join() operation understand that the thread waiting is a UI
> thread, and so will keep the UI thread spinning?
>
> If it does hold up the UI thread, is there a good way of keeping the UI
> thread active, but still waiting at that point and not returning until
> the job is finished.
>
> Does the IJobManager.begin(ISchedulingRule) also understand that it
> could be coming in from a UI thread, and if the rule says block, it
> keeps the UI thread spinning but doesn't return until the scheduling
> rule is satisfied?
>
Re: JOBs and waiting in the UI. [message #233661 is a reply to message #233645] Fri, 23 April 2004 20:58 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Thanks for the info!

--
Thanks, Rich Kulp

Previous Topic:Images not available from ISharedImages
Next Topic:Re: Interesting article on notable changes in M8
Goto Forum:
  


Current Time: Sun Jul 07 08:51:30 GMT 2024

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

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

Back to the top