Contents

stop(completionHandler:)

Stops a VM that’s in either a running or paused state.

Declaration

func stop(completionHandler: @escaping ((any Error)?) -> Void)
func stop() async throws

Parameters

  • completionHandler:

    A block called after the VM stopped successfully, or on error. The error parameter passed to the block is nil if the stop was successful.

Discussion

To determine if a VM is in a state that allows you to stop it, check the VM’s canStop or canRequestStop properties.

See Also

Starting and stopping the VM