Commit 16a47dcf authored by wangwx's avatar wangwx

add interface PoolDequeue

parent 218e6a07
...@@ -24,6 +24,12 @@ import ( ...@@ -24,6 +24,12 @@ import (
"unsafe" "unsafe"
) )
type PoolDequeue interface {
PushHead(val interface{}) bool
PopHead() (interface{}, bool)
PopTail() (interface{}, bool)
}
// poolDequeue is a lock-free fixed-size single-producer, // poolDequeue is a lock-free fixed-size single-producer,
// multi-consumer queue. The single producer can both push and pop // multi-consumer queue. The single producer can both push and pop
// from the head, and consumers can pop from the tail. // from the head, and consumers can pop from the tail.
......
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