// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import ErSoQueue.ErSoException;

public class ErSoQueueTest {
    public static void main(String[] args) throws ErSoException {
        ErSoQueue q = new ErSoQueueDQImpl(2, 10);
        for(int i = 0; i < 10; i++) {
            q.submitWork(new ErSoQueue.Work());
        }
        long t1 = System.currentTimeMillis();
        for(int i = 0; i < 10; i++) {
            System.out.println(q.getResult().isStatus());
        }
        long t2 = System.currentTimeMillis();
        System.out.println(t2 - t1);
        q.stop(true);
    }
}
