Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Threading: SWT events/ FX events(On which thread are UI events processed?)
Threading: SWT events/ FX events [message #1760467] Thu, 27 April 2017 14:30 Go to next message
Alexander Kerner is currently offline Alexander KernerFriend
Messages: 25
Registered: January 2015
Junior Member
HI,

I am wondering on which thread are UI events processed?

In our Eclipse RCP application, events coming from SWT widgets are handled on the main thread. Nevertheless, if I open an FX view just before, those events are handled on the JavaFX Application Thread.

Are these threads maybe the same?
Re: Threading: SWT events/ FX events [message #1760473 is a reply to message #1760467] Thu, 27 April 2017 15:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
JavaFX and SWT run on the same native event Thread unlike swing/awt who has it's own
Re: Threading: SWT events/ FX events [message #1760475 is a reply to message #1760473] Thu, 27 April 2017 15:28 Go to previous messageGo to next message
Alexander Kerner is currently offline Alexander KernerFriend
Messages: 25
Registered: January 2015
Junior Member
Hi Thomas,
thanks for replying. Does that mean
Display.getDefault().asyncExec();

is effectively the same as
Platform.runLater();

?
Is the 'main' thread renamed after the FX Platform was started? Since the thread name is 'main' and 'Java FX Application Thread' according to the logger.
Re: Threading: SWT events/ FX events [message #1760505 is a reply to message #1760475] Thu, 27 April 2017 18:24 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No not the same but similar. Calling from fx to SWT does not require any thread sync!
Re: Threading: SWT events/ FX events [message #1760514 is a reply to message #1760505] Thu, 27 April 2017 21:59 Go to previous messageGo to next message
Alexander Kerner is currently offline Alexander KernerFriend
Messages: 25
Registered: January 2015
Junior Member
What about the other way around?
Re: Threading: SWT events/ FX events [message #1760522 is a reply to message #1760514] Fri, 28 April 2017 03:54 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Same no sync needed when calling fx from SWT nor if SWT calls into FX
Previous Topic:How do I install e(fx)clipse 2.5.0?
Next Topic:How to FXGraph include with attributes
Goto Forum:
  


Current Time: Tue Mar 19 07:01:49 GMT 2024

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

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

Back to the top