Skip to content

Instantly share code, notes, and snippets.

@brendoncheung
Created August 12, 2019 17:18
Show Gist options
  • Save brendoncheung/3896b29df0f3cdc6b5f3e032186c0f99 to your computer and use it in GitHub Desktop.
Save brendoncheung/3896b29df0f3cdc6b5f3e032186c0f99 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