sclass RSTVar extends VarWithNotify { IVF1 action; A lastSentValue; ReliableSingleThread rst = new(l0 update); volatile bool forceUpdate; *(IVF1 *action) { onChange(rst); } private void update { A value = get(); if (!eq(lastSentValue, value) || forceUpdate) { forceUpdate = false; lastSentValue = value; action?.get(value); } } void forceUpdate { set forceUpdate; rst.trigger(); } }