runIfNotRunning

abstract suspend fun runIfNotRunning(request: Request, handleCallback: suspend (RequestCallback) -> Unit): Boolean

Runs the given RequestCallback if no other requests in the given request type is already running. If run, the request will be run in the current thread.

Return

True if the request is run, false otherwise.

Parameters

request

The type of the request.

handleCallback

The request to run.