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 » How do I create a loop for a window to react to volatile changes to a global variable?
Re: How do I create a loop for a window to react to volatile changes to a global variable? [message #51359 is a reply to message #51336] Thu, 14 March 2019 22:11 Go to previous messageGo to previous message
Didier is currently offline  Didier
Messages: 728
Registered: November 2008
Location: France
Contributor
Hello Slashupp,

Maybe you should try using 'PostCallback()'

1 - Use PostCallback( UpdateCB ) in the thread modifying the variables
2 - In the GUI thread, UpdateCB() will get called and will do the update work

Note : a mutex is still needed to protect the variable UNLESS these variables can be set/read atomically

Didier
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AsyncWork, IsFinished() may not be working properly
Next Topic: Encoding URL for HttpRequest
Goto Forum:
  


Current Time: Sun Jun 08 00:48:56 CEST 2025

Total time taken to generate the page: 0.05658 seconds