AsynWorker *worker = new AsynWorker(getRuntime()->getAppInstance(this_thread::get_id()));
//如需传入局部变量,可在网上搜索lambda表达式的用法
worker->invoke([this]() {
std::this_thread::sleep_for(std::chrono::milliseconds(200));//延时200ms
})->onFinished([this]() {
//todo:这里调用要延时执行的函数
})->start();