job/queue.go
func (q *queue) Close() {
	q.mtx.Lock()
	defer q.mtx.Unlock()

	if q.exit == nil {
		return
	}

	q.exit <- struct{}{}
	<-q.exited
}
func (q *queue) Close() {
	q.mtx.Lock()
	defer q.mtx.Unlock()

	if q.exit == nil {
		return
	}

	q.exit <- struct{}{}
	<-q.exited
}
func ( q * queue ) Close ( ) { q . mtx . Lock ( ) defer q . mtx . Unlock ( ) if q . exit == nil { return } q . exit <- struct { } { } <- q . exited }
// Close causes currently running Process() function to exit.
Close causes currently running Process () function to exit .