![Learn Data Structures and Algorithms with Golang](https://wfqqreader-1252317822.image.myqcloud.com/cover/744/36698744/b_36698744.jpg)
上QQ阅读APP看书,第一时间看更新
The StartTicketIssue method
The StartTicketIssue method starts the issuing of a ticket for passengers standing in a queue. The StartTicketIssue method on Queue sends messageTicketStart to the message queue and queueTicket receives the message. The ticket issue is started by sending messages to the queue, as follows:
// StartTicketIssue starts the ticket issue
func (Queue *Queue) StartTicketIssue() {
Queue.message <- messageTicketStart
<-Queue.queueTicket
}