载入中...
搜索中...
未找到
eve::thread::Channel类 参考
Thread-safe message queue (love2d-style Channel). Values are strings so the API stays overload-free for Squirrel bindings. Exposed to scripts as "ThreadChannel" (network already owns "Channel"). 更多...
#include <Channel.h>
Public 成员函数 | |
| Channel () | |
| Channel (std::string name) | |
| ~Channel () | |
| std::string | getName () const |
| void | push (std::string value) |
| std::string | pop () |
| Non-blocking pop; returns "" if empty. | |
| std::string | demand () |
| Block until a value is available, then pop it. | |
| std::string | supply (int timeoutMs) |
| Block up to timeoutMs; returns "" on timeout. | |
| bool | hasData () const |
| int | getCount () const |
| void | clear () |
友元 | |
| class | ThreadPool |
详细描述
Thread-safe message queue (love2d-style Channel). Values are strings so the API stays overload-free for Squirrel bindings. Exposed to scripts as "ThreadChannel" (network already owns "Channel").
构造及析构函数说明
◆ Channel() [1/2]
| eve::thread::Channel::Channel | ( | ) |
在文件 Channel.cpp 第 8 行定义.
◆ Channel() [2/2]
|
explicit |
在文件 Channel.cpp 第 10 行定义.
◆ ~Channel()
|
default |
成员函数说明
◆ clear()
| void eve::thread::Channel::clear | ( | ) |
在文件 Channel.cpp 第 64 行定义.
◆ demand()
| std::string eve::thread::Channel::demand | ( | ) |
◆ getCount()
| int eve::thread::Channel::getCount | ( | ) | const |
在文件 Channel.cpp 第 59 行定义.
◆ getName()
| std::string eve::thread::Channel::getName | ( | ) | const |
在文件 Channel.cpp 第 14 行定义.
◆ hasData()
| bool eve::thread::Channel::hasData | ( | ) | const |
在文件 Channel.cpp 第 54 行定义.
◆ pop()
| std::string eve::thread::Channel::pop | ( | ) |
◆ push()
| void eve::thread::Channel::push | ( | std::string | value | ) |
在文件 Channel.cpp 第 16 行定义.
引用了 value.
◆ supply()
| std::string eve::thread::Channel::supply | ( | int | timeoutMs | ) |
友元及相关函数文档
◆ ThreadPool
|
friend |
该类的文档由以下文件生成:
- src/modules/thread/Channel.h
- src/modules/thread/Channel.cpp