lane icon indicating copy to clipboard operation
lane copied to clipboard

Queue work failed

Open anbaoyong opened this issue 8 years ago • 1 comments

@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 avatar Feb 10 '17 07:02 anbaoyong

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

anbaoyong avatar Feb 10 '17 07:02 anbaoyong