Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue work failed #17

Open
anbaoyong opened this issue Feb 10, 2017 · 1 comment
Open

Queue work failed #17

anbaoyong opened this issue Feb 10, 2017 · 1 comment

Comments

@anbaoyong
Copy link

@oleiade when i use Queue's example ,the result is endless loop .
the @code:
var queue *Queue = NewQueue()

// Let's add the incoming clients to the queue
queue.Enqueue("grumpyClient")
queue.Enqueue("happyClient")
queue.Enqueue("ecstaticClient")

fmt.Println(queue.Head) // grumpyClient

// Let's handle the clients asynchronously
for client := queue.Dequeue(); client != nil; {
go fmt.Println(client)
}

@anbaoyong
Copy link
Author

it seems that 'queue.Dequeue()' cann't remove the item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant