scope onUserUtterance_addHandler. static Lock #lock = lock(); static TailFile #tailFile; static L #handlers = synchroList(); // f : voidfunc(S) - gets only the utterance static void onUserUtterance_addHandler(VF1 handler) { lock lock; handlers.add(handler); if (tailFile == null) tailFile = onUserUtterance(voidfunc(S s) { for (O handler : cloneList(handlers)) pcallF(handler, s); }); } end scope