载入中...
搜索中...
未找到
MainThreadPost.h
浏览该文件的文档.
1#pragma once
2
3// Hand a message back to the main thread from a worker.
4//
5// The thread module's postMain / submitPost need to enqueue onto the event
6// queue, which would make the thread pool depend on the event module. Going
7// through a capability keeps that edge out and lets a build without the event
8// module still use the pool for pure compute.
9
10#include "common/Export.h"
11
12#include <string>
13
14namespace eve::caps {
15
17public:
18 static constexpr const char* capabilityName = "IMainThreadPost";
19 virtual ~IMainThreadPost() = default;
20
26 virtual void prepare() = 0;
27
29 virtual void postToMainThread(std::string name, std::string data) = 0;
30};
31
32} // namespace eve::caps
#define EVENGINE_API
宿主(eve / libmain)导出宏;插件从进程导入同一批符号。
Definition Export.h:16
Light2D::Data * data
const char * name
Definition RockMesh.cpp:21
virtual void postToMainThread(std::string name, std::string data)=0
virtual void prepare()=0
virtual ~IMainThreadPost()=default