srecord noeq FastCollabWorker(ICollab collab) extends Thread { volatile gettable long errorCount; volatile gettable long spinWaits; volatile gettable long workCount; volatile gettable Throwable lastError; run { Runnable work; while ((work = collab.grabWork()) != collab.DONE) { try { if (work != null) { ++workCount; work.run(); } else ++spinWaits; } catch e { ++errorCount; lastError = e; } } } }