【文件属性】:
文件名称:channel:使用 C++11 原子进行线程间通信的无等待环形缓冲区
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-18 15:31:16
C++
渠道
使用 C++11 原子进行线程间通信的无等待环形缓冲区。
Channel
c ( 15 );
string* s = new string( " hello there! " );
if (!c.Send(s)) {
// Send returns false if the channel is full
}
string* t;
if (!c.Receive(&t)) {
// Receive returns false if the channel is empty
}
请参阅以查看真实示例。
【文件预览】:
channel-master
----channel.h(2KB)
----README.md(375B)
----.gitignore(3B)