首页
IT
登录
6mi
u
盘
搜
搜 索
IT
进程和线程操作
进程和线程操作
xiaoxiao
2021-03-26
22
线程
类继承FRunnable,实现virtual uint32 Run()方法
class VRHOME_API AVRHomeGameModeBase : public AGameMode, public FRunnable { Public: // Begin FRunnable interface. virtual bool Init(); virtual uint32 Run();//
需要实现
virtual void Stop(); // End FRunnable interface FRunnableThread* Thread; }
调用FRunnableThread的静态方法创建线程
Thread = FRunnableThread::Create(this, TEXT(
“
DeamonThread
”
));
线程函数运行结束,线程终止
进程
创建进程
FString path, FString param; FProcHandle m_processHandle = FPlatformProcess::CreateProc(path.GetCharArray().GetData(), param.GetCharArray().GetData(), true, false, false, NULL, 0, NULL, NULL);
结束进程
FPlatformProcess::TerminateProc(m_processHandle, true);
等待进程
FPlatformProcess::WaitForProc(m_processHandle);
转载请注明原文地址: https://ju.6miu.com/read-661925.html
技术
最新回复
(
0
)