process Turnstile { Counter counter_; public Turnstile(Counter counter) { counter_ = counter; } private void simulateInterrupt() { if (Math.random()>0.95) { int sleepTime = 1; try { Thread.sleep(sleepTime);} catch(InterruptedException e) {}; } } public void body() { for (int i=0; i<20; i++) { counter_.incValue(); } } }