Commit 919d98af authored by wangwx's avatar wangwx

change the name of comments

parent f17fd664
...@@ -24,6 +24,7 @@ import ( ...@@ -24,6 +24,7 @@ import (
"unsafe" "unsafe"
) )
// SPMCLockFreeQ is a lock-free queue.
type SPMCLockFreeQ interface { type SPMCLockFreeQ interface {
PushHead(val interface{}) bool PushHead(val interface{}) bool
PopHead() (interface{}, bool) PopHead() (interface{}, bool)
...@@ -205,7 +206,7 @@ func (d *poolDequeue) PopTail() (interface{}, bool) { ...@@ -205,7 +206,7 @@ func (d *poolDequeue) PopTail() (interface{}, bool) {
return val, true return val, true
} }
// NewSPMCLockFreeQ new a poolDequeue instance. // NewSPMCLockFreeQ new a SPMCLockFreeQ instance.
func NewSPMCLockFreeQ(n int) (SPMCLockFreeQ, error) { func NewSPMCLockFreeQ(n int) (SPMCLockFreeQ, error) {
if n&(n-1) != 0 { if n&(n-1) != 0 {
return nil, errors.New("the size of pool must be a power of 2") 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