mirror of
https://github.com/golang/go
synced 2024-11-08 00:26:18 -07:00
format
This commit is contained in:
parent
a2f1235758
commit
ded020d02c
@ -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)))&(1<<dequeueBits-1) == 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