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

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: 740
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: Fri Oct 16 14:54:04 GMT+2 2026

Total time taken to generate the page: 0.01621 seconds