Esempio n. 1
0
 private Runner getRunner() {
   try {
     return (Runner) threadpool.pop();
   } catch (EmptyStackException empty) {
     if (runners.activeCount() > 255) throw new RuntimeException("System overload");
     return new Runner();
   }
 }
 private void popMenu() {
   if (!menuStack.isEmpty()) {
     menuStack.pop();
   }
 }
 private void clearMenus() {
   while (!menuStack.isEmpty()) {
     menuStack.pop();
   }
 }