I think this function might be easier to read if you shortcircuit if not r (i.e. `return setImmediate cb_wf unless r`)