mirror of
https://github.com/golang/go
synced 2024-11-08 04:56:16 -07:00
revert
This commit is contained in:
parent
83090ad6d5
commit
a2f1235758
@ -80,7 +80,7 @@ func (d *poolDequeue) pack(head, tail uint32) uint64 {
|
|||||||
func (d *poolDequeue) pushHead(val interface{}) bool {
|
func (d *poolDequeue) pushHead(val interface{}) bool {
|
||||||
ptrs := atomic.LoadUint64(&d.headTail)
|
ptrs := atomic.LoadUint64(&d.headTail)
|
||||||
head, tail := d.unpack(ptrs)
|
head, tail := d.unpack(ptrs)
|
||||||
if tail+uint32(len(d.vals)) == head {
|
if (tail+uint32(len(d.vals)))&(1<<dequeueBits-1) == head{
|
||||||
// Queue is full.
|
// Queue is full.
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user