When I try to Sleep(10000) in my plugin, a plugin with GUI, the plugin crushed.
The Sleep() is to wait a thread, which is doing tasks.
Code: Select all
......
#include <thread>
#include <windows.h>
......
void CCLivoxLOAMDlg::on_StartButton_clicked() {
......
//std::this_thread::sleep_for(std::chrono::seconds(100)); // crush here
Sleep(10000); // here too
......
}
Thanks!