sclass _Activity { long started; O r; Thread thread; } static Set tempActivity_list = synchroHashSet(); sbool tempActivity_debug; static AutoCloseable tempActivity(O r) { if (tempActivity_debug) print("Activity started: " + r); new _Activity a; a.started = sysNow(); a.r = r; a.thread = currentThread(); tempActivity_list.add(a); ret new AutoCloseable { public void close() { tempActivity_list.remove(a); if (tempActivity_debug) print("Activity ended: " + r); } }; }