U++ framework
Do not panic. Ask here before giving up.

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 #58162 is a reply to message #58159] Sun, 06 March 2022 01:41 Go to previous messageGo to previous message
zsolt is currently offline  zsolt
Messages: 705
Registered: December 2005
Location: Budapest, Hungary
Contributor
I use Thread class in my older code with Mutex protected containers as job queue.
Currently I prefer CoWork.
To notify GUI thread, I use PostCallback. It is a very easy way.
GUI is thread safe now, but I haven't tested GUI that way yet.
For HTTP, SMTP I created simple curl wrapper classes with progress support, but now you can use HttpRequest's WhenDo to notify user with a progress bar.
SQL: I use separate, per thread sessions, opened by the thread.
Serialization: Mutex and Mutex::Lock utility class are very useful.
 
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: Wed Sep 30 12:12:33 GMT+2 2026

Total time taken to generate the page: 0.03492 seconds