Skip to content

Instantly share code, notes, and snippets.

@brendoncheung
Created August 12, 2019 19:26
Show Gist options
  • Save brendoncheung/550610fa68f1b91373c4f8fcab6570fd to your computer and use it in GitHub Desktop.
Save brendoncheung/550610fa68f1b91373c4f8fcab6570fd to your computer and use it in GitHub Desktop.
public class Main {
public static void main(String[] args) throws Exception {
final TicketManager tm = new TicketManager();
Thread t1 = new Thread(new Runnable() {
public void run() {
tm.purchaseTickets(90);
}
});
t1.start();
tm.purchaseTickets(60);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment