载入中...
搜索中...
未找到
eve::thread::Thread类 参考

Thread module: default pool, named channels, pool factory. Script: eve.Thread() → getPool / newThreadPool / getChannel / newChannel. 更多...

#include <Thread.h>

类 eve::thread::Thread 继承关系图:
eve::Module

Public 成员函数

 Module_REG (Thread)
 
 Thread ()
 
 ~Thread () override
 
int getHardwareConcurrency () const
 Hardware concurrency hint (at least 1).
 
ThreadPoolgetPool ()
 Shared default pool (created lazily with hardwareConcurrency workers).
 
ThreadPoolnewThreadPool (int workerCount=0)
 Create an independent pool. Caller owns it (delete when done).
 
JobSystemgetJobSystem ()
 Shared engine-wide JobSystem (created lazily with hardware concurrency workers). Use it for dependency graphs, parallel_for and frame-scoped jobs; the pool below remains for simple async work.
 
ChannelgetChannel (std::string name)
 Named shared channel (love2d-style). Same name → same Channel instance for the lifetime of the module.
 
ChannelnewChannel ()
 Anonymous channel (not registered in the name map). Caller owns it.
 
void postMain (std::string name, std::string data="")
 Thread-safe post onto the Event module queue (any thread). Main loop: event.pump is unrelated; just event.poll / pollData.
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 
virtual std::string getName () const =0
 

详细描述

Thread module: default pool, named channels, pool factory. Script: eve.Thread() → getPool / newThreadPool / getChannel / newChannel.

在文件 Thread.h21 行定义.

构造及析构函数说明

◆ Thread()

eve::thread::Thread::Thread ( )
default

◆ ~Thread()

eve::thread::Thread::~Thread ( )
override

在文件 Thread.cpp19 行定义.

成员函数说明

◆ getChannel()

Channel * eve::thread::Thread::getChannel ( std::string  name)

Named shared channel (love2d-style). Same name → same Channel instance for the lifetime of the module.

在文件 Thread.cpp51 行定义.

引用了 name.

◆ getHardwareConcurrency()

int eve::thread::Thread::getHardwareConcurrency ( ) const

Hardware concurrency hint (at least 1).

在文件 Thread.cpp26 行定义.

引用了 n.

被这些函数引用 getJobSystem() , 以及 getPool().

◆ getJobSystem()

JobSystem * eve::thread::Thread::getJobSystem ( )

Shared engine-wide JobSystem (created lazily with hardware concurrency workers). Use it for dependency graphs, parallel_for and frame-scoped jobs; the pool below remains for simple async work.

在文件 Thread.cpp44 行定义.

引用了 eve::thread::createJobSystem() , 以及 getHardwareConcurrency().

◆ getPool()

ThreadPool * eve::thread::Thread::getPool ( )

Shared default pool (created lazily with hardwareConcurrency workers).

在文件 Thread.cpp31 行定义.

引用了 getHardwareConcurrency().

◆ Module_REG()

eve::thread::Thread::Module_REG ( Thread  )

◆ newChannel()

Channel * eve::thread::Thread::newChannel ( )

Anonymous channel (not registered in the name map). Caller owns it.

在文件 Thread.cpp64 行定义.

◆ newThreadPool()

ThreadPool * eve::thread::Thread::newThreadPool ( int  workerCount = 0)

Create an independent pool. Caller owns it (delete when done).

在文件 Thread.cpp38 行定义.

◆ postMain()

void eve::thread::Thread::postMain ( std::string  name,
std::string  data = "" 
)

Thread-safe post onto the Event module queue (any thread). Main loop: event.pump is unrelated; just event.poll / pollData.

在文件 Thread.cpp66 行定义.

引用了 data, name , 以及 eve::cap::query().


该类的文档由以下文件生成: