core / pragma.jobs / BackgroundManager / fireAndForgetIO /

fireAndForgetIO #

abstract fun fireAndForgetIO(name: String, block: suspend CoroutineScope.() -> Unit): Job

Runs the block of code in the background on kotlinx.coroutines.Dispatchers.IO.

This is intended for calls that may block a thread, e.g. file I/O, databases.

Parameters #

name

The name used in logging of errors

block

Block of code to be executed.