Ejemplo 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();
   }
 }
Ejemplo n.º 2
0
 private void popMenu() {
   if (!menuStack.isEmpty()) {
     menuStack.pop();
   }
 }
Ejemplo n.º 3
0
 private void clearMenus() {
   while (!menuStack.isEmpty()) {
     menuStack.pop();
   }
 }