shawdown Posted October 16, 2019 Share Posted October 16, 2019 I know it is not advisable to use ServerModule but I need to run a routine on the main thread of the unigui application. This routine is only when the software is debugged or when it is being released it will not be executed. How can I execute some block of code on the main thread? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 16, 2019 Administrators Share Posted October 16, 2019 Hi, There is no main thread in uniGUI. You can use a UniThreadTimer to run custom code in an independent thread. Quote Link to comment Share on other sites More sharing options...
shawdown Posted October 16, 2019 Author Share Posted October 16, 2019 When placing or desired code in a TTimer it has the expected behavior. I would like to execute this code without using a TTimer. This code executed by TTimer would not be the main thread? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 16, 2019 Administrators Share Posted October 16, 2019 A TUniThreadTimer is different than a TTimer. Quote Link to comment Share on other sites More sharing options...
shawdown Posted October 16, 2019 Author Share Posted October 16, 2019 Yes they are different. That's why I used TTimer. TUniThreadTimer does not work as expected. I need to run on the same thread as HttpServer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.