package
Version:
v0.0.0-...-882a3c6
Opens a new window with list of versions in this module.
Published: Jun 13, 2018
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
并发安全的动态队列.
优点:
1、队列初始化速度快;
2、可以向队头/队尾进行Push/Pop操作;
3、取数据时如果队列为空那么会阻塞等待;
func (q *Queue) PopBack() interface{}
从队尾先进先出地从队列取出一项数据,当没有数据可获取时,阻塞等待
func (q *Queue) PopFront() interface{}
从队头先进先出地从队列取出一项数据,当没有数据可获取时,阻塞等待
Source Files
¶
Click to show internal directories.
Click to hide internal directories.