Not perfect may be, but works for me :D
I agree :)The only permanent solution is to stop using timers as threads and do a proper multithreading application.
There should be better way to avoid hanging the threads. Some developers found a way. Browsers does not freez, media players does not freez, torrents are keep getting downloaded while you are holding mouse button. But as you can see in my example, not just drawing, but everything stops.
So me and everyone else here is open for that better solution :D
the only permanent solution is to stop using timers as threads and do a proper multithreading applicationButton2 in my example is starting a thread. Or i'm not doing it right?
By the way you are way way wrong about at least browsers if they use the default windows buttons they do stop updating. test it your self go to a slow loading page press ctrl+r to reload it and click on the minimize button the browser will freeze until you release that mouse button.I am opening cnn.com. I'm holding the minimize botton before even my browser connects to their server. In 5 seconds the web page is completely loaded in front of my eyes while i still holding minimize button.
firefox freezes while reloading lazarus forums when pressing down the minimize button for me, I'm on windows 7, firefox quantum 60.0 (64-bit) I have never used edge nor I care to sorry.QuoteBy the way you are way way wrong about at least browsers if they use the default windows buttons they do stop updating. test it your self go to a slow loading page press ctrl+r to reload it and click on the minimize button the browser will freeze until you release that mouse button.I am opening cnn.com. I'm holding the minimize botton before even my browser connects to their server. In 5 seconds the web page is completely loaded in front of my eyes while i still holding minimize button.
Correction.
Chrome & IE freez while drawing, but still getting page in background.
Firefox & Edge does not freez in any kind.
So I am USING THREADS. Give me an example app with not freezing thread even if its form freezes.any thread that does not use synchronize for example the following thread will keep on running regardless of the state of the main thread.