github.com/egonelbre/exp@v0.0.0-20240430123955-ed1d3aa93911/queues/decl.go (about)

     1  package goqueuestest
     2  
     3  import "unsafe"
     4  
     5  type Queue interface {
     6  	Enqueue(value interface{})
     7  	Dequeue() (value interface{}, ok bool)
     8  }
     9  
    10  // lockfree node
    11  type lfNode struct {
    12  	value interface{}
    13  	next  unsafe.Pointer
    14  }
    15  
    16  const growBy = 1000