static AutoCloseable vmBus_onMessage(fS msg, final VF1 onMessage) {
ret tempAdd(vm_busListeners_live(), voidfunc(S _msg, O arg) {
if (eq(msg, _msg))
callF(onMessage, arg);
});
}
ifclass VF2
static AutoCloseable vmBus_onMessage(S msg, final VF2 onMessage) {
ret vmBus_onMessage(msg, voidfunc(O[] o) {
callF(onMessage, first(o), second(o));
});
}
endif
ifclass VF3
static AutoCloseable vmBus_onMessage(S msg, final VF3 onMessage) {
ret vmBus_onMessage(msg, voidfunc(O[] o) {
callF(onMessage, first(o), second(o), third(o));
});
}
endif
static AutoCloseable vmBus_onMessage(S msg, Runnable onMessage) {
ret vmBus_onMessage(msg, runnableToVF1(onMessage));
}