startSync

fun startSync(timeout: Duration = 30.seconds)

Starts the service asynchronously and blocks until it is running.

Parameters

timeout

the maximum duration to wait for the service to start. Defaults to 30 seconds.

Throws

if the service is not running within timeout.

if the service fails, or reaches a state from which it cannot start.


fun startSync(timeout: Duration)

Starts the service and blocks until it is running, for Java callers: the overload taking a Kotlin Duration is compiled under a mangled name that Java cannot call.

Parameters

timeout

the maximum duration to wait for the service to start.

Throws

if the service is not running within timeout.

if the service fails, or reaches a state from which it cannot start.