Skip to main content


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 14:50 Go to next message
Eclipse UserFriend
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 15:25 Go to previous messageGo to next message
Eclipse UserFriend
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 16:53 Go to previous messageGo to next message
Laurent Marchal is currently offline Laurent MarchalFriend
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 13:33 Go to previous messageGo to next message
Anton Mising name is currently offline Anton Mising nameFriend
Messages: 7
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 14:16 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
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 13:42 Go to previous message
tomas  is currently offline tomas Friend
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: Tue Apr 23 13:20:19 GMT 2024

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

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

Back to the top