Why having a single thread for display is so important? [message #536107] |
Thu, 27 May 2010 06:03 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
Having a single thread for display has forced me many times to build an application which is multi threaded...
And everybody knows about the problems of a multithreaded application.
So i was wondering is it worth it to have a single threaded display??
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
[Updated on: Thu, 27 May 2010 12:09] Report message to a moderator
|
|
|
|
Re: Why having a single thread for display, so important? [message #536169 is a reply to message #536157] |
Thu, 27 May 2010 10:14 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
The dog cat one was a twister....
Now since all the ui updates have to be done thru ui thread and you can not have heavy operations like conversions,retreaval,processing in ui thread ,since it will hang the ui thread....
Hence seperate threads(jobs) for heavy processing and ui updating (by uijob or display.syncExec or display.asyncExec) has to be created...
and since the heavy operation should be able to run in background,hence inevitable it becomes a multi threaded application...
In fact an RCP application is a multithreaded application(pls dont tell me to go to RCP Forum )
Quote: | By the way, I don't understand, how single-threaded display forces you to have multiple threads and how multithreaded display would help you avoid having multiple threads. You could ask: I need a dog that likes cats because I don't want to have a cat
|
its not about threads its about updating the ui from any thread not restricted by UI thread only....
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
[Updated on: Thu, 27 May 2010 10:20] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04032 seconds