DevExpress ChartControl What are the performance optimizations for loading large data
Because the WaitForSingleObject function hangs the main thread (any message is not processed), and the sub-thread ThreadFunc is setting up the progress bar and has been waiting for the main thread to return from processing the refresh message before detecting the notification event. Thus both threads are waiting for each other and deadlock occurs, which should be avoided when programming.