载入中...
搜索中...
未找到
Thread.cpp
浏览该文件的文档.
Definition Exception.h:14
virtual std::string getName() const =0
Thread-safe message queue (love2d-style Channel). Values are strings so the API stays overload-free f...
Definition Channel.h:17
std::string supply(int timeoutMs)
Block up to timeoutMs; returns "" on timeout.
Definition Channel.cpp:42
Abstract job scheduler: dependencies, parallel_for, task_group, arena.
Definition JobSystem.h:153
Fixed-size worker pool. Owns worker std::threads; tasks run FIFO. Squirrel VM is not thread-safe — do...
Definition ThreadPool.h:24
void waitAll()
Block until idle. Throws when called by a worker belonging to this pool.
Definition ThreadPool.cpp:156
Task * submitSleep(int ms)
Sleep on a worker, then mark done — useful from scripts / tests.
Definition ThreadPool.cpp:109
void stop()
Stop accepting work and join workers. Worker calls are rejected. Idempotent.
Definition ThreadPool.cpp:164
Task * submitPost(std::string name, std::string data="", int delayMs=0)
Sleep, then post an Event on the main queue (thread-safe). Scripts poll via event....
Definition ThreadPool.cpp:134
Task * submitPush(Channel *channel, std::string message, int delayMs=0)
Sleep, then push a message onto a channel (cross-thread signalling).
Definition ThreadPool.cpp:117
Thread module: default pool, named channels, pool factory. Script: eve.Thread() → getPool / newThread...
Definition Thread.h:21
Channel * newChannel()
Anonymous channel (not registered in the name map). Caller owns it.
Definition Thread.cpp:64
ThreadPool * getPool()
Shared default pool (created lazily with hardwareConcurrency workers).
Definition Thread.cpp:31
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 e...
Definition Thread.cpp:66
JobSystem * getJobSystem()
Shared engine-wide JobSystem (created lazily with hardware concurrency workers). Use it for dependenc...
Definition Thread.cpp:44
Channel * getChannel(std::string name)
Named shared channel (love2d-style). Same name → same Channel instance for the lifetime of the module...
Definition Thread.cpp:51
ThreadPool * newThreadPool(int workerCount=0)
Create an independent pool. Caller owns it (delete when done).
Definition Thread.cpp:38
Thread()
JobSystem * createJobSystem(int workerCount)
Create a JobSystem with the configured backend.
Definition JobSystem.cpp:14
Definition Build.cpp:11