Skip to content

an Bounded Lock Free Queue use array as circle queue

Notifications You must be signed in to change notification settings

bighunter513/goqueue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goqueue

an Bounded Lock Free Queue use array as circle queue

clone from https://github.com/yireyun/go-queue and changed little things, add some comments

run test case

make test ## test all cases

make lfqueue ## only test lfqueue

how to use

q := NewQueue(1024)

ok, cnt := qq.Put(val)

if ok {

}

val, ok, cnt := qq.Get()

if ok {

}

put & get both can be failed, so caller must check and do try thing

About

an Bounded Lock Free Queue use array as circle queue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published