!7 module ThreadComparison > DynSingleFunction { void doIt { print("Benchmarking..."); final int endTime = sysTimePlus(5000); final new AtomicLong count1; final new AtomicLong count2; L threads = ll( higherPriorityThread(r { while (sysNow() < endTime) incAtomicLong(count1) }), startThread(r { while (sysNow() < endTime) incAtomicLong(count2) })); joinThreads(threads); print("Count 1 [priority " + first(threads).getPriority() + "]: " + count1!); print("Count 2 [priority " + second(threads).getPriority() + "]: " + count2!); } visualize { northAndCenter(super.visualize(), dm_printLogComponent())); } }