fn with_handle<F, R>(f: F) -> Rwhere
    F: FnMut(&LocalHandle) -> R,