- Learn Data Structures and Algorithms with Golang
- Bhagvan Kommadi
- 66字
- 2021-06-24 15:37:51
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
}