Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Thread calls GUI
Re: Thread calls GUI [message #20086 is a reply to message #20084] Tue, 17 February 2009 07:36 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sami wrote on Mon, 16 February 2009 15:35

Thanks for the replies.

Ok, I cannot kill the thread. What about thread exceptions. How should they be implemented. I have an option to replace c++ exceptions with a call to static function if needed. Are the exceptions allowed and where should I catch them (in the example I gave at the top post)? It's not trivial to get rid of the exceptions in the thread (to exit cleanly).



But exceptions are GOOD in this context. They would perform the necessarry cleanup of resources. Simply catch the "thread canceled" exception in the main thread routine...

In fact, the only hard part is to how to throw them. There I see no other option than to call some function periodically, check for the exception flag and throw if set.

Well, anyway, I guess any serious GUI program should show the progress of processing anyway - maybe that is the right place to check for cancelation too....

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StaticMutex/ONCELOCK question
Next Topic: GUI MT project does not compile
Goto Forum:
  


Current Time: Fri Mar 29 08:36:19 CET 2024

Total time taken to generate the page: 0.01632 seconds