Commit 89232d38 authored by wangwx's avatar wangwx

add comments for NewPoolDequeue

parent 3f67d565
......@@ -198,6 +198,7 @@ func (d *poolDequeue) PopTail() (interface{}, bool) {
return val, true
}
// NewPoolDequeue new a poolDequeue instance.
func NewPoolDequeue(n int) (*poolDequeue, error) {
if n&(n-1) != 0 {
return nil, errors.New("the size of pool must be a power of 2")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment