Created
August 12, 2019 19:26
-
-
Save brendoncheung/550610fa68f1b91373c4f8fcab6570fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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