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

Home » U++ Library support » U++ Callbacks and Timers » callbacks freeze gui
callbacks freeze gui [message #48155] Sun, 28 May 2017 22:35 Go to next message
aftershock is currently offline  aftershock
Messages: 143
Registered: May 2008
Experienced Member
Hi,
I used a timer in UPP.
I noticed the callback freezes the gui, if the called takes too long to run.
As a solution, I started the timer inside a separate thread, yet this continued to happen.
To avoid freezing... I made the called to execute the time consuming operations in a separate thread..
Is this how it is supposed to work?
Timer freezes the gui each time it calls its callback?

A.
Re: callbacks freeze gui [message #48163 is a reply to message #48155] Mon, 29 May 2017 20:23 Go to previous message
Zbych is currently offline  Zbych
Messages: 332
Registered: July 2009
Senior Member
aftershock wrote on Sun, 28 May 2017 22:35
Hi,
To avoid freezing... I made the called to execute the time consuming operations in a separate thread..
Is this how it is supposed to work?
Timer freezes the gui each time it calls its callback?


Yes, that is normal. You have to run time consuming tasks in separate thread or if task contains some loop you can call ProcessEvents() in the loop.


Previous Topic: PostCallback in constructor
Next Topic: THISBACK1 works well, how can i make it with lambda
Goto Forum:
  


Current Time: Sat Apr 25 15:41:39 GMT+2 2026

Total time taken to generate the page: 0.00476 seconds