static new ThreadLocal emit_tl; static void emit(O o) { L l = emit_tl!; if (l == null) emit_tl.set(l = new L); l.add(o); }