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 #58163 is a reply to message #58159] Sun, 06 March 2022 09:36 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1226
Registered: August 2007
Senior Contributor
Hello Alboni

Quote:

I wonder if there is an elegant way to execute tasks in the background. There are often MySql queries or http or rpc calls or other tasks that can potentially take more time than one can spend in a callback if you want a responsive userinterface.
How does one go about that in u++?


Try AsyncWork. It is simple, allows you to cancel tasks, and allows you to elegantly return values. (Based on CoWork). https://www.ultimatepp.org/src$Core$AsyncWork_en-us.html

Tutorial: https://www.ultimatepp.org/srcdoc$Core$Tutorial$en-us.html#S ection_7_5


Best regards,
Oblivion


[Updated on: Sun, 06 March 2022 10:22]

Report message to a moderator

 
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:35:43 CEST 2025

Total time taken to generate the page: 0.06993 seconds