import javax.imageio.*; import java.awt.image.*; import java.awt.event.*; import java.awt.*; import java.security.spec.*; import java.security.*; import java.lang.management.*; import java.lang.ref.*; import java.lang.reflect.*; import java.net.*; import java.io.*; import javax.swing.table.*; import javax.swing.text.*; import javax.swing.event.*; import javax.swing.*; import java.util.concurrent.atomic.*; import java.util.concurrent.*; import java.util.regex.*; import java.util.List; import java.util.zip.*; import java.util.*; public class main { static LinkedBlockingQueue queue = new LinkedBlockingQueue(); static List done = new ArrayList(); public static void main(String[] args) throws Exception { Thread _t_0 = new Thread("Executor") { public void run() { try { for (String input : iterateOverBlockingQueue(queue)) process(input); } catch (Exception _e) { throw _e instanceof RuntimeException ? (RuntimeException) _e : new RuntimeException(_e); } } }; _t_0.start(); } static void process(String input) { // TODO } static Iterable iterateOverBlockingQueue(final LinkedBlockingQueue q) { return new Iterable() { public Iterator iterator() { return new Iterator() { A x; public boolean hasNext() { try { while (x == null) x = q.poll(1, TimeUnit.DAYS); return true; } catch (Throwable __e) { throw __e instanceof RuntimeException ? (RuntimeException) __e : new RuntimeException(__e); }} public A next() { hasNext(); A _x = x; x = null; return _x; } public void remove() { } }; } }; } }