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

Home » U++ Library support » U++ MT-multithreading and servers » Problem breaking loop (with close button) in main thread
Re: Problem breaking loop (with close button) in main thread [message #59035 is a reply to message #59034] Tue, 18 October 2022 19:15 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 656
Registered: March 2007
Contributor
Hi Awksed:

I think what you can do is make your wait/check function(check_again()) re-entrant and instead of Sleep in the main thread, send check_again to a PostCallback and let the GUI thread(main thread) to arrange it be recalled after (roughly)specified time duration and do the check again.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dealing with background tasks elegantly in a userinterface
Next Topic: error / memory leak in HttpServer example
Goto Forum:
  


Current Time: Thu Jun 04 04:26:13 GMT+2 2026

Total time taken to generate the page: 0.00653 seconds