载入中...
搜索中...
未找到
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.
 
 Channel (std::string name)
 Channel.
 
 ~Channel ()
 Channel.
 
std::string getName () const
 Returns the name.
 
void push (std::string value)
 Pushes .
 
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
 True when data.
 
int getCount () const
 Returns the count.
 
void clear ()
 Clears .
 

友元

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.h 第 19 行定义.

构造及析构函数说明

◆ Channel() [1/2]

eve::thread::Channel::Channel ( )

Channel.

在文件 Channel.cpp 第 8 行定义.

◆ Channel() [2/2]

eve::thread::Channel::Channel ( std::string  name)
explicit

Channel.

在文件 Channel.cpp 第 10 行定义.

◆ ~Channel()

eve::thread::Channel::~Channel ( )
default

成员函数说明

◆ clear()

void eve::thread::Channel::clear ( )

Clears .

在文件 Channel.cpp 第 64 行定义.

◆ demand()

std::string eve::thread::Channel::demand ( )

Block until a value is available, then pop it.

在文件 Channel.cpp 第 33 行定义.

引用了 state , 以及 v.

◆ getCount()

int eve::thread::Channel::getCount ( ) const

Returns the count.

在文件 Channel.cpp 第 59 行定义.

◆ getName()

std::string eve::thread::Channel::getName ( ) const

Returns the name.

在文件 Channel.cpp 第 14 行定义.

◆ hasData()

bool eve::thread::Channel::hasData ( ) const

True when data.

在文件 Channel.cpp 第 54 行定义.

◆ pop()

std::string eve::thread::Channel::pop ( )

Non-blocking pop; returns "" if empty.

在文件 Channel.cpp 第 24 行定义.

引用了 v.

◆ push()

void eve::thread::Channel::push ( std::string  value)

Pushes .

在文件 Channel.cpp 第 16 行定义.

引用了 value.

◆ supply()

std::string eve::thread::Channel::supply ( int  timeoutMs)

Block up to timeoutMs; returns "" on timeout.

在文件 Channel.cpp 第 42 行定义.

引用了 state , 以及 v.

友元及相关函数文档

◆ ThreadPool

friend class ThreadPool
friend

在文件 Channel.h 第 60 行定义.


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