Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » UIJob hangs
UIJob hangs [message #328705] Mon, 02 June 2008 10:50 Go to next message
Eclipse User
Originally posted by: andrei.serea.ama.us

Hy all

I'm having a problem with an UIJob. I'm trying to schedule and run it when
the user presses a button in a property page, but the platform never runs it
(eclipse hangs on join and the actual job never starts to run).
Any ideas?

Thanks,
Andrei
Re: UIJob hangs [message #328708 is a reply to message #328705] Mon, 02 June 2008 11:25 Go to previous messageGo to next message
Eclipse User
Originally posted by: kosta.bea.com

Sounds like you are creating a deadlock situation. Can you post your
thread dumps?

- Konstantin
Re: UIJob hangs [message #328713 is a reply to message #328705] Mon, 02 June 2008 12:53 Go to previous messageGo to next message
Laurent Marchal is currently offline Laurent Marchal
Messages: 91
Registered: July 2009
Member
If you use join() in the UI thread, you will block the UI thread until
the UIJob finishes --> that will block indefinitely !


Andrei Serea wrote:
> Hy all
>
> I'm having a problem with an UIJob. I'm trying to schedule and run it when
> the user presses a button in a property page, but the platform never runs it
> (eclipse hangs on join and the actual job never starts to run).
> Any ideas?
>
> Thanks,
> Andrei
>
>
Re: UIJob hangs [message #652287 is a reply to message #328713] Thu, 03 February 2011 08:33 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 4
Registered: August 2010
Junior Member
Hei!

I don't really understand it - why is the UI thread going to be blocked indefinitely - the UIJob could last only a couple of seconds?!

Best regards
Re: UIJob hangs [message #652304 is a reply to message #652287] Thu, 03 February 2011 09:16 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/03/2011 08:33 AM, Anton wrote:
> Hei!
>
> I don't really understand it - why is the UI thread going to be blocked
> indefinitely - the UIJob could last only a couple of seconds?!

The UIJob itself posts an asyncExec(*) and then returns
Job.ASYNC_FINISH. But a job.join() will block the calling thread until
something (in this case, the asyncExec) calls Job.done(*). If you
join() on the UI thread, the asyncExec will never get run.

Ta da.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: UIJob hangs [message #654613 is a reply to message #652304] Wed, 16 February 2011 08:42 Go to previous message
tomas  is currently offline tomas
Messages: 3
Registered: February 2011
Junior Member
useful for me, thanks
Previous Topic:Comparison Report
Next Topic:LTK: No default action starting Apply Script wizard?
Goto Forum:
  


Current Time: Sat Aug 30 02:30:51 EDT 2014

Powered by FUDForum. Page generated in 0.02794 seconds