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 » Dealing with background tasks elegantly in a userinterface
Re: Dealing with background tasks elegantly in a userinterface [message #58194 is a reply to message #58162] Fri, 18 March 2022 18:42 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
zsolt wrote on Sun, 06 March 2022 01:41

To notify GUI thread, I use PostCallback. It is a very easy way.


You might enjoy checking out Ctrl::Call. Combined with lambda that is even easier.

Current rules for parallel GUI programming:

- only the main thread can manipulate windows (open, close, move) or run event loop (this is actually a limitation forced by win32 architecture)
- exception to this rule is Prompt* function which open window but can be called from non-main threads
- except this, non-main threads can call widget methods as long as they use GuiLock

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: httprequest fails getting entire url content
Next Topic: Problem breaking loop (with close button) in main thread
Goto Forum:
  


Current Time: Tue Aug 26 07:36:04 CEST 2025

Total time taken to generate the page: 0.05462 seconds