Created
August 12, 2019 17:18
-
-
Save brendoncheung/3896b29df0f3cdc6b5f3e032186c0f99 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