Timing of controlling ticket dispenser

That's why I said: "Dispense tickets by adding a number to the global variable 'RemainingToDispense'."