dl
dl::ListMultiThreadCache< T > 模板类 参考

多线程队列(带缓冲) 更多...

#include <dl_list_mt_cache.h>

Public 成员函数

bool PopFront (T &a)
 取第一个,顺序通过 SetQueueMode 指定,默认FIFO
 
void Add (const T &buf)
 添加
 
void Add (T &&buf)
 添加
 
void Move ()
 结束添加时调用,或立即刷新
 
size_t GetSize ()
 添加
 
bool IsEmpty ()
 所有任务完成
 
void Clear ()
 添加
 
void SetQueueMode (QueueMode mode)
 
 ListMultiThreadCache (QueueMode mode=QueueMode::FIFO)
 

详细描述

template<typename T>
class dl::ListMultiThreadCache< T >

多线程队列(带缓冲)

在文件 dl_list_mt_cache.h24 行定义.

构造及析构函数说明

◆ ListMultiThreadCache()

template<typename T>
dl::ListMultiThreadCache< T >::ListMultiThreadCache ( QueueMode mode = QueueMode::FIFO)
inline

在文件 dl_list_mt_cache.h122 行定义.

成员函数说明

◆ Add() [1/2]

template<typename T>
void dl::ListMultiThreadCache< T >::Add ( const T & buf)
inline

添加

注解
线程A调用

在文件 dl_list_mt_cache.h49 行定义.

◆ Add() [2/2]

template<typename T>
void dl::ListMultiThreadCache< T >::Add ( T && buf)
inline

添加

注解
线程A调用

在文件 dl_list_mt_cache.h64 行定义.

◆ Clear()

template<typename T>
void dl::ListMultiThreadCache< T >::Clear ( )
inline

添加

注解
线程A调用

在文件 dl_list_mt_cache.h109 行定义.

◆ GetSize()

template<typename T>
size_t dl::ListMultiThreadCache< T >::GetSize ( )
inline

添加

注解
线程A调用

在文件 dl_list_mt_cache.h91 行定义.

◆ IsEmpty()

template<typename T>
bool dl::ListMultiThreadCache< T >::IsEmpty ( )
inline

所有任务完成

注解
线程A调用

在文件 dl_list_mt_cache.h100 行定义.

◆ Move()

template<typename T>
void dl::ListMultiThreadCache< T >::Move ( )
inline

结束添加时调用,或立即刷新

注解
线程A调用

在文件 dl_list_mt_cache.h79 行定义.

◆ PopFront()

template<typename T>
bool dl::ListMultiThreadCache< T >::PopFront ( T & a)
inline

取第一个,顺序通过 SetQueueMode 指定,默认FIFO

注解
线程B调用(处理线程)
返回值
成功返回true,并弹出

在文件 dl_list_mt_cache.h32 行定义.

◆ SetQueueMode()

template<typename T>
void dl::ListMultiThreadCache< T >::SetQueueMode ( QueueMode mode)
inline

在文件 dl_list_mt_cache.h117 行定义.


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