Skip to content

Queue work failed #17

@anbaoyong

Description

@anbaoyong

@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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions