file_queue
简介
文件队列
组件接口
FileQueueImpl.gs
queue一样,但是使用磁盘文件
函数原型 | 函数作用 |
---|---|
string get_name() | 获取队列名字 |
string get_file_path() | 获取队列关联的文件目录 |
int get_write_size() | 获取写对象待写队列的大小 |
int get_read_size() | 获取读对象待读队列的大小 |
bool send_dup(mixed val) | 向队列发送数据 |
mixed receive(mixed wait_time = -1) | 从文件队列里接收数据 |
void drop_all_files() | 删除所有文件 |
void debug_flush() | 调试接口: 写对象flush文件写缓冲 |
file_queue.gs
函数原型 | 函数作用 |
---|---|
object create_queue(string name = nil, map args = ) | 创建一个文件队列对象 |
void delete_queue(string name) | 删除一个队列,包括它对应的所有文件也会删除 |
object find_queue(string name) | 通过名字查找队列 |
string gen_name() | 生成一个唯一的文件队列名字 |