- Learn Data Structures and Algorithms with Golang
- Bhagvan Kommadi
- 63字
- 2021-06-24 15:37:51
The EndPass method
The EndPass method stops the passenger queue moving toward the ticket counter. The EndPass method on Queue sends messagePassEnd to the message queue in the following code. The passenger is moved to the counter for ticket processing, and the passenger is then out of the queue:
//EndPass ends the Pass Queue
func (Queue *Queue) EndPass() {
Queue.message <- messagePassEnd
}